[PATCH] Add support for the hasDeclaration() matcher in the dynamic layer.
Manuel Klimek
klimek at google.com
Fri Nov 15 09:27:29 PST 2013
================
Comment at: docs/LibASTMatchersReference.html:2509
@@ -2497,3 +2508,3 @@
function. e.g. various subtypes of clang::Type and various expressions.
FIXME: Add all node types for which this is matcher is usable due to
getDecl().
----------------
Perhaps fix the fixme? :)
================
Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:666
@@ +665,3 @@
+/// \brief All types that are supported by HasDeclarationMatcher above.
+typedef internal::TypeList<
+ internal::TypeList<CallExpr, CXXConstructExpr, DeclRefExpr, EnumType>,
----------------
Any reason we can't inline this into the method decl (and ideally parse it for the doc-generator from there). Doesn't seem worse than the "usable as" comment (and easier to keep in sync)
http://llvm-reviews.chandlerc.com/D1889
BRANCH
has_decl
ARCANIST PROJECT
clang
More information about the cfe-commits
mailing list