flx added a comment. Thank you for the review, Yitzhak!
================ Comment at: clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-copy-initialization.cpp:541 Orig.constMethod(); + UnnecessaryCopy.constMethod(); } ---------------- ymandel wrote: > If this line weren't here, then we'd delete line 537, in which case `Ref` > itself becomes unused and so line 536 should be deleted as well. Do you > handle this case? Good catch. This case is not handled. It would require recursively checking whether the deleted statement was the only reference to another reference which is hard and requires subtracting that decl ref from all these calculations. I would like to to see this being a common enough issue before addressing it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102175/new/ https://reviews.llvm.org/D102175 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits