From: Craig Silverstein Date: Tue, 6 Jul 2010 23:51:34 +0000 (+0000) Subject: Add a const version of a method, to be consistent with other methods X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dd5faf05dfe0163bdde939937d4fb0270086178a;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107737 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/DeclTemplate.h b/include/clang/AST/DeclTemplate.h index 10230d2223..16646b0077 100644 --- a/include/clang/AST/DeclTemplate.h +++ b/include/clang/AST/DeclTemplate.h @@ -1421,6 +1421,10 @@ public: virtual ClassTemplateDecl *getCanonicalDecl(); + const ClassTemplateDecl *getCanonicalDecl() const { + return const_cast(this)->getCanonicalDecl(); + } + /// Create a class template node. static ClassTemplateDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L,