[PATCH] D57112: [ASTTypeTraits][ASTMatchers][OpenMP] OMPClause handling
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 16 11:56:11 PDT 2019
lebedev.ri marked an inline comment as done.
lebedev.ri added inline comments.
================
Comment at: include/clang/AST/ASTTypeTraits.h:81
+ /// \{
+ /// Return the AST node kind of this ASTNodeKind.
----------------
aaron.ballman wrote:
> These markings are a bit strange, can you explain them to me?
It is weird, but i think this is the right solution.
See `isAllowedToContainClause()` narrower.
This `asOMPClauseKind()` allows to pass a whole matcher, and then distill the inner output node type.
I.e. now i can spell `ompExecutableDirective(isAllowedToContainClause(ompDefaultClause()))`
(and the `ompDefaultClause()` won't actually be used for matching!), instead of doing something like e.g.
`ompExecutableDirective(isAllowedToContainClause(OMPC_default))`
which looks horrible, and will likely not work well with `clang-query`?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57112/new/
https://reviews.llvm.org/D57112
More information about the cfe-commits
mailing list