baloghadamsoftware added inline comments.
================
Comment at: clang-tidy/performance/ForRangeCopyCheck.cpp:50
+ const auto VarType = Var->getType();
+ if (std::find_if(WhiteListTypes.begin(), WhiteListTypes.end(),
+ [&](llvm::StringRef WhiteListType) {
----------------
JonasToth wrote:
> lebedev.ri wrote:
> > `llvm::any_of()`
> This configuration should be used in the matchers. Please see
> `cppcoreguidelines-no-malloc` for an example on how to do it in the matchers.
> Having it there usually improves performance and is clearer.
`google-runtime-references` has this in the `check()` function. It seems there
is no common agreement where to put this. `cppcoreguidelines-no-malloc` is not
a good example since it simple compares strings instead of matching regular
expressions. I think here we should allow regular expressions. Then we would
need a new matcher called `matchesAnyName`. Should I create it?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D52727
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits