[PATCH] Adding hasDeclaration overload for TemplateSpecializationType

Edwin Vane edwin.vane at intel.com
Wed Feb 20 11:22:51 PST 2013


    - Removal of inadvertently added whitespace

Hi klimek,

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

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D432?vs=1043&id=1044#toc

Files:
  include/clang/ASTMatchers/ASTMatchersInternal.h

Index: include/clang/ASTMatchers/ASTMatchersInternal.h
===================================================================
--- include/clang/ASTMatchers/ASTMatchersInternal.h
+++ include/clang/ASTMatchers/ASTMatchersInternal.h
@@ -406,6 +406,15 @@
     return matchesDecl(Node->getAsCXXRecordDecl(), Finder, Builder);
   }
 
+  /// \brief Gets the TemplateDecl from a TemplateSpecializationType
+  /// and returns whether the inner matches on it.
+  bool matchesSpecialized(const TemplateSpecializationType &Node,
+                          ASTMatchFinder *Finder,
+                          BoundNodesTreeBuilder *Builder) const {
+    return matchesDecl(Node.getTemplateName().getAsTemplateDecl(),
+                       Finder, Builder);
+  }
+
   /// \brief Extracts the Decl of the callee of a CallExpr and returns whether
   /// the inner matcher matches on it.
   bool matchesSpecialized(const CallExpr &Node, ASTMatchFinder *Finder,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D432.2.patch
Type: text/x-patch
Size: 942 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130220/b50366d9/attachment.bin>


More information about the cfe-commits mailing list