diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-07 06:33:48 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-07 06:33:48 +0000 |
commit | b13e357dac872bc7d507a770c4fb0f7b47ff0ac9 (patch) | |
tree | b6dfd3b9f8a7eea0d9254d76556d168eeb468425 | |
parent | fa184a46526eca735e08a483bba56a5d69fc4b5b (diff) |
getTemplateSpecializationKind should be const.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90750 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/DeclCXX.h | 2 | ||||
-rw-r--r-- | lib/AST/DeclCXX.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h index 417f71814d..17942f3e58 100644 --- a/include/clang/AST/DeclCXX.h +++ b/include/clang/AST/DeclCXX.h @@ -655,7 +655,7 @@ public: /// \brief Determine whether this particular class is a specialization or /// instantiation of a class template or member class of a class template, /// and how it was instantiated or specialized. - TemplateSpecializationKind getTemplateSpecializationKind(); + TemplateSpecializationKind getTemplateSpecializationKind() const; /// \brief Set the kind of specialization or template instantiation this is. void setTemplateSpecializationKind(TemplateSpecializationKind TSK); diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp index 4680b87cb2..292a3ed630 100644 --- a/lib/AST/DeclCXX.cpp +++ b/lib/AST/DeclCXX.cpp @@ -472,8 +472,8 @@ CXXRecordDecl::setInstantiationOfMemberClass(CXXRecordDecl *RD, = new (getASTContext()) MemberSpecializationInfo(RD, TSK); } -TemplateSpecializationKind CXXRecordDecl::getTemplateSpecializationKind() { - if (ClassTemplateSpecializationDecl *Spec +TemplateSpecializationKind CXXRecordDecl::getTemplateSpecializationKind() const{ + if (const ClassTemplateSpecializationDecl *Spec = dyn_cast<ClassTemplateSpecializationDecl>(this)) return Spec->getSpecializationKind(); |