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:
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:
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.
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(
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:
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:
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);
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(
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/
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);
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);
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:
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 =
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
14 matches
Mail list logo