[cfe-commits] r90750 - in /cfe/trunk: include/clang/AST/DeclCXX.h lib/AST/DeclCXX.cpp
Anders Carlsson
andersca at mac.com
Sun Dec 6 22:33:48 PST 2009
Author: andersca
Date: Mon Dec 7 00:33:48 2009
New Revision: 90750
URL: http://llvm.org/viewvc/llvm-project?rev=90750&view=rev
Log:
getTemplateSpecializationKind should be const.
Modified:
cfe/trunk/include/clang/AST/DeclCXX.h
cfe/trunk/lib/AST/DeclCXX.cpp
Modified: cfe/trunk/include/clang/AST/DeclCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=90750&r1=90749&r2=90750&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclCXX.h (original)
+++ cfe/trunk/include/clang/AST/DeclCXX.h Mon Dec 7 00:33:48 2009
@@ -655,7 +655,7 @@
/// \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);
Modified: cfe/trunk/lib/AST/DeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=90750&r1=90749&r2=90750&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclCXX.cpp (original)
+++ cfe/trunk/lib/AST/DeclCXX.cpp Mon Dec 7 00:33:48 2009
@@ -472,8 +472,8 @@
= 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();
More information about the cfe-commits
mailing list