[PATCH] D59540: [clang-tidy] [PR41119] readability-identifier-naming incorrectly fixes lambda capture
Eugene Zelenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 19 09:43:06 PDT 2019
Eugene.Zelenko added inline comments.
================
Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:790
if (const auto *DeclRef = Result.Nodes.getNodeAs<DeclRefExpr>("declRef")) {
- SourceRange Range = DeclRef->getNameInfo().getSourceRange();
- addUsage(NamingCheckFailures, DeclRef->getDecl(), Range,
- Result.SourceManager);
- return;
+ const auto &Parents = Result.Context->getParents(*DeclRef);
+ bool LambdaDeclRef = false;
----------------
Type is not obvious, so auto should not be used.
================
Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:797
+ if (ST && isa<ImplicitCastExpr>(ST)) {
+ const auto &CastParents = Result.Context->getParents(*ST);
+ if (!CastParents.empty())
----------------
Type is not obvious, so auto should not be used.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59540/new/
https://reviews.llvm.org/D59540
More information about the cfe-commits
mailing list