aaron.ballman added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp:92 + // to reference it and avoid the copy. + if (!isa<ReferenceType>(T) && !isa<PointerType>(T)) + return true; ---------------- ================ Comment at: clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-copy-initialization.cpp:492 + Orig.nonConstMethod(); +} ---------------- Making sure I understand properly, if you were calling `Orig.constMethod()` then the diagnostic should be triggered, correct? Assuming so, having those test cases would be useful. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91893/new/ https://reviews.llvm.org/D91893 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits