[PATCH] D54309: [AST] Allow limiting the scope of common AST traversals (getParents, RAV).
Eric Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 14 01:52:28 PST 2018
ioeric accepted this revision.
ioeric added a comment.
This revision is now accepted and ready to land.
lgtm
================
Comment at: lib/ASTMatchers/ASTMatchFinder.cpp:674
+ // Nodes may have no parents if:
+ // a) the node is the TranslationUnitDecl
+ // a) there is a bug in the AST, and the node is not reachable
----------------
nit: a,b,c
================
Comment at: lib/ASTMatchers/ASTMatchFinder.cpp:680
+ assert(Node.get<TranslationUnitDecl *>() ||
+ !llvm::any_of(ActiveASTContext->getTraversalScope(),
+ [](Decl *D) {
----------------
`none_of`?
Repository:
rC Clang
https://reviews.llvm.org/D54309
More information about the cfe-commits
mailing list