[cfe-commits] r107737 - /cfe/trunk/include/clang/AST/DeclTemplate.h

Craig Silverstein csilvers2000 at yahoo.com
Tue Jul 6 16:51:34 PDT 2010


Author: csilvers
Date: Tue Jul  6 18:51:34 2010
New Revision: 107737

URL: http://llvm.org/viewvc/llvm-project?rev=107737&view=rev
Log:
Add a const version of a method, to be consistent with other methods
of the same type.  I think this was just an oversight before.

Reviewed by chandlerc.  Submitted as an "obvious" fix.

Modified:
    cfe/trunk/include/clang/AST/DeclTemplate.h

Modified: cfe/trunk/include/clang/AST/DeclTemplate.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclTemplate.h?rev=107737&r1=107736&r2=107737&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclTemplate.h (original)
+++ cfe/trunk/include/clang/AST/DeclTemplate.h Tue Jul  6 18:51:34 2010
@@ -1421,6 +1421,10 @@
 
   virtual ClassTemplateDecl *getCanonicalDecl();
 
+  const ClassTemplateDecl *getCanonicalDecl() const {
+    return const_cast<ClassTemplateDecl*>(this)->getCanonicalDecl();
+  }
+
   /// Create a class template node.
   static ClassTemplateDecl *Create(ASTContext &C, DeclContext *DC,
                                    SourceLocation L,





More information about the cfe-commits mailing list