[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

2021-06-18 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 rGbdd5da9dec61: [clang-tidy] performance-unnecessary-copy-initialization: Directly examine theā€¦ (authored by flx). Changed prior to commit:

[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

2021-06-18 Thread Felix Berger via Phabricator via cfe-commits
flx updated this revision to Diff 353064. flx marked 2 inline comments as done. flx added a comment. Renamed initializer matcher. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103021/new/ https://reviews.llvm.org/D103021 Files:

[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

2021-06-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp:62 AST_MATCHER_FUNCTION(StatementMatcher, isInitializedFromReferenceToConst) { auto OldVarDeclRef = This name seems a little off now.

[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

2021-06-15 Thread Felix Berger via Phabricator via cfe-commits
flx marked an inline comment as done. flx added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp:98-101 auto Matches = match(findAll(declStmt(has(varDecl(equalsNode(

[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

2021-06-15 Thread Felix Berger via Phabricator via cfe-commits
flx updated this revision to Diff 352236. flx added a comment. Remove now unnecessary FunctionDecl. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103021/new/ https://reviews.llvm.org/D103021 Files:

[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

2021-06-15 Thread Felix Berger via Phabricator via cfe-commits
flx updated this revision to Diff 352233. flx marked an inline comment as done. flx added a comment. Directly examine initializer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103021/new/ https://reviews.llvm.org/D103021 Files:

[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

2021-06-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp:98-101 auto Matches = match(findAll(declStmt(has(varDecl(equalsNode( .bind("declStmt")), +Body, Context);

[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

2021-06-11 Thread Felix Berger via Phabricator via cfe-commits
flx marked an inline comment as done. flx added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp:98-101 auto Matches = match(findAll(declStmt(has(varDecl(equalsNode(

[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

2021-06-11 Thread Felix Berger via Phabricator via cfe-commits
flx updated this revision to Diff 351425. flx marked an inline comment as not done. flx added a comment. Use more efficient method to check for local variable declaration. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103021/new/

[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

2021-06-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp:98-101 auto Matches = match(findAll(declStmt(has(varDecl(equalsNode( .bind("declStmt")), +Body, Context);

[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

2021-06-09 Thread Felix Berger via Phabricator via cfe-commits
flx added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp:98-101 auto Matches = match(findAll(declStmt(has(varDecl(equalsNode( .bind("declStmt")), +Body, Context);

[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

2021-06-09 Thread Felix Berger via Phabricator via cfe-commits
flx updated this revision to Diff 350994. flx marked 2 inline comments as done. flx added a comment. Addressed first round of comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103021/new/ https://reviews.llvm.org/D103021 Files:

[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

2021-06-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp:97 + // Search the whole function body for decl statements of the initialization + // variable not just the current block statement. auto Matches =

[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

2021-05-24 Thread Felix Berger via Phabricator via cfe-commits
flx created this revision. flx added reviewers: hokein, ymandel, aaron.ballman. Herald added a subscriber: xazax.hun. flx requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. This fixes false positive cases where a reference is