]> granicus.if.org Git - clang/commitdiff
Add a missing getMostRecentDecl to ClassTemplateDecl.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 19 Oct 2013 21:06:31 +0000 (21:06 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 19 Oct 2013 21:06:31 +0000 (21:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193040 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclTemplate.h

index 26f6891b5b58af793340cf61d76ca9115731afb8..d2984fe42accb13580f87eb89986cc168a9b811b 100644 (file)
@@ -1900,6 +1900,14 @@ public:
              RedeclarableTemplateDecl::getPreviousDecl());
   }
 
+  ClassTemplateDecl *getMostRecentDecl() {
+    return cast<ClassTemplateDecl>(
+        RedeclarableTemplateDecl::getMostRecentDecl());
+  }
+  const ClassTemplateDecl *getMostRecentDecl() const {
+    return const_cast<ClassTemplateDecl*>(this)->getMostRecentDecl();
+  }
+
   ClassTemplateDecl *getInstantiatedFromMemberTemplate() {
     return cast_or_null<ClassTemplateDecl>(
              RedeclarableTemplateDecl::getInstantiatedFromMemberTemplate());