[PATCH] D91893: [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.

2020-12-03 Thread Felix Berger via Phabricator via cfe-commits
flx updated this revision to Diff 309361. flx added a comment. Fixed clang tidy warnings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91893/new/ https://reviews.llvm.org/D91893 Files: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyIni

[PATCH] D91893: [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.

2020-12-07 Thread Felix Berger via Phabricator via cfe-commits
flx added a comment. Could someone take a first pass at this change? It would be great progress on this as this is the last currently known case that generates false positives. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91893/new/ https://revie

[PATCH] D91893: [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.

2020-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I have some quick drive-by comments but still have to think about the test cases a bit more. Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp:74 +// the BlockStmt. It does this by checking the following: +//

[PATCH] D91893: [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.

2020-12-08 Thread Felix Berger via Phabricator via cfe-commits
flx updated this revision to Diff 310285. flx marked 5 inline comments as done. flx added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91893/new/ https://reviews.llvm.org/D91893 Files: clang-tools-extra/clang

[PATCH] D91893: [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.

2020-12-08 Thread Felix Berger via Phabricator via cfe-commits
flx added a comment. Thanks for the review, Aaron! I appreciate it. Please let me know if you have any questions about the test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91893/new/ https://reviews.llvm.org/D91893 __

[PATCH] D91893: [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.

2020-12-10 Thread Aaron Ballman via Phabricator via cfe-commits
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(T) && !isa(T)) +return true; Comment at: clang-tools-ext

[PATCH] D91893: [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.

2020-12-10 Thread Felix Berger via Phabricator via cfe-commits
flx updated this revision to Diff 310888. flx added a comment. Added positive variants of new tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91893/new/ https://reviews.llvm.org/D91893 Files: clang-tools-extra/clang-tidy/performance/Unneces

[PATCH] D91893: [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.

2020-12-10 Thread Felix Berger via Phabricator via cfe-commits
flx marked an inline comment as done. flx added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-copy-initialization.cpp:492 + Orig.nonConstMethod(); +} aaron.ballman wrote: > Making sure I understand properly, if

[PATCH] D91893: [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.

2020-12-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Thanks for verifying! Aside from the minor nit with `isa<>`, this LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91893/new/ ht

[PATCH] D91893: [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.

2020-12-10 Thread Felix Berger via Phabricator via cfe-commits
flx updated this revision to Diff 310997. flx marked an inline comment as done. flx added a comment. Shortened isa<> expression. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91893/new/ https://reviews.llvm.org/D91893 Files: clang-tools-extra/cl

[PATCH] D91893: [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.

2020-12-10 Thread Felix Berger via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG671ad580610a: [clang-tidy] performance-unnecessary-copy-initialization: Prevent falseā€¦ (authored by flx). Repository: rG LLVM Github Monorepo CHA

[PATCH] D91893: [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.

2020-11-20 Thread Felix Berger via Phabricator via cfe-commits
flx created this revision. flx added reviewers: aaron.ballman, hokein. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. flx requested review of this revision. Extend the check to not only look at the variable the unnecessarily copied variable is initialized from, bu

[PATCH] D91893: [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.

2020-11-20 Thread Felix Berger via Phabricator via cfe-commits
flx updated this revision to Diff 306773. flx added a comment. Fix formatting and comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91893/new/ https://reviews.llvm.org/D91893 Files: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyI