[PATCH] D91144: Add utility for testing if we're matching nodes AsIs
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 10 11:27:19 PST 2020
aaron.ballman added inline comments.
================
Comment at: clang/lib/ASTMatchers/ASTMatchersInternal.cpp:195
+bool ASTMatchFinder::isTraversalAsIs() const {
+ return getASTContext().getParentMapContext().getTraversalKind() == TK_AsIs;
+}
----------------
steveire wrote:
> aaron.ballman wrote:
> > I don't insist, but I do wonder if we want to inline the definition in the header file rather than put it in the implementation file so that call sites have an easier time inlining the functionality.
> If I inline it I get
> ```
> error: invalid use of incomplete type ‘class clang::ASTContext’
> ```
> I think there was a drive at some point to use `ASTContext` less in header files.
Thanks for checking!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91144/new/
https://reviews.llvm.org/D91144
More information about the cfe-commits
mailing list