[PATCH] Add TemplateSpecializationType polymorphism for hasTemplateArgument and hasAnyTemplateArgument, and (out of necessity) a refersToExpr matcher.

Peter Collingbourne peter at pcc.me.uk
Tue Feb 18 21:54:27 PST 2014



================
Comment at: include/clang/ASTMatchers/ASTMatchers.h:314
@@ -313,1 +313,3 @@
 
+// TODO: unify ClassTemplateSpecializationDecl and TemplateSpecializationType's
+// APIs for accessing the template argument list.
----------------
Manuel Klimek wrote:
> It's called FIXME in llvm.
I never noticed that before, but FIXME does appear to be more dominant. Changed.

================
Comment at: include/clang/ASTMatchers/ASTMatchers.h:495
@@ +494,3 @@
+/// templateSpecializationType(hasAnyTemplateArgument(
+///   refersToExpr(hasDescendant(declRefExpr(to(fieldDecl(hasName("next"))))))))
+///   matches the specialization \c A<&B::next> with \c fieldDecl(...) matching
----------------
Manuel Klimek wrote:
> I'm curious whether that shouldn't be "isExpr" or something. Not sure about the right terminology here.
Hmm, it probably should be isExpr. Changed.


http://llvm-reviews.chandlerc.com/D2810



More information about the cfe-commits mailing list