[PATCH] D78223: [clang-tidy] performance-range-for-copy only for copy.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 27 14:34:14 PDT 2020
aaron.ballman accepted this revision.
aaron.ballman added a comment.
LGTM aside from some small nits
================
Comment at: clang-tools-extra/clang-tidy/performance/ForRangeCopyCheck.cpp:68
+// loop index because it's less clear than copying the temporary.
+static bool isCopyConstructedFromLValueArg(const VarDecl &LoopVar, ASTContext& Ctx) {
+ const auto *Init = dyn_cast_or_null<CXXConstructExpr>(LoopVar.getInit());
----------------
Formatting is off here, so run through clang-format?
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/performance-for-range-copy.cpp:50
+
struct Convertible {
----------------
Spurious whitespace change?
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78223/new/
https://reviews.llvm.org/D78223
More information about the cfe-commits
mailing list