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

Manuel Klimek klimek at google.com
Sat Feb 15 00:45:13 PST 2014


  +richard for the AST/TemplateBase.h change and the terminology question.


================
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.
----------------
It's called FIXME in llvm.

================
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
----------------
I'm curious whether that shouldn't be "isExpr" or something. Not sure about the right terminology here.


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



More information about the cfe-commits mailing list