From dd5faf05dfe0163bdde939937d4fb0270086178a Mon Sep 17 00:00:00 2001 From: Craig Silverstein Date: Tue, 6 Jul 2010 23:51:34 +0000 Subject: [PATCH] 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 --- include/clang/AST/DeclTemplate.h | 4 ++++ 1 file changed, 4 insertions(+) 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, -- 2.40.0