[PATCH] D85218: In clang-tidy base checks prevent anonymous functions from triggering assertions
Alexander Kornienko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 10 08:45:57 PDT 2020
alexfh accepted this revision.
alexfh added a comment.
LG with a couple of comments. Do you need someone to land the patch for you?
================
Comment at: clang-tools-extra/clang-tidy/add_new_check.py:139
const auto *MatchedDecl = Result.Nodes.getNodeAs<FunctionDecl>("x");
- if (MatchedDecl->getName().startswith("awesome_"))
+ if ((!MatchedDecl->getIdentifier()) || MatchedDecl->getName().startswith("awesome_"))
return;
----------------
No need for parentheses around this.
================
Comment at: clang-tools-extra/docs/clang-tidy/Contributing.rst:205
+ const auto *MatchedDecl = Result.Nodes.getNodeAs<FunctionDecl>("x");
+ if ((!MatchedDecl->getIdentifier()) || MatchedDecl->getName().startswith("awesome_"))
return;
----------------
ditto.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85218/new/
https://reviews.llvm.org/D85218
More information about the cfe-commits
mailing list