[PATCH] D52727: [clang-tidy] White List Option for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 4 05:45:57 PDT 2018
lebedev.ri added a comment.
Thanks looks even better, getting there.
There are some spurious whiteline changes.
================
Comment at: clang-tidy/performance/ForRangeCopyCheck.cpp:53
const auto *Var = Result.Nodes.getNodeAs<VarDecl>("loopVar");
+
// Ignore code in macros since we can't place the fixes correctly.
----------------
Spurious newline
================
Comment at: clang-tidy/utils/Matchers.cpp:20
+matchesAnyListedName(const std::vector<std::string> &NameList) {
+ SmallString<256> NameRegEx;
+ llvm::raw_svector_ostream NameOut(NameRegEx);
----------------
```
if(NameList.empty())
return false;
```
================
Comment at: clang-tidy/utils/Matchers.cpp:29
+ NameOut << "^(?!.*)";
+ return matchesName(NameRegEx.str());
+}
----------------
Why do you need to 'concatenate' all the regexes?
Why not simply match in a loop?
https://reviews.llvm.org/D52727
More information about the cfe-commits
mailing list