summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclTemplate.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-01-12 09:06:06 +0000
committerJay Foad <jay.foad@gmail.com>2011-01-12 09:06:06 +0000
commit39c7980772fd980ff06384453d0df1c25ed4fe7e (patch)
tree03b3de9c2e0547301263cf88e9a498c7bbb68ddc /clang/lib/AST/DeclTemplate.cpp
parentebbeb792345cf5ef490f2a8d75d1e271082ef457 (diff)
downloadbcm5719-llvm-39c7980772fd980ff06384453d0df1c25ed4fe7e.tar.gz
bcm5719-llvm-39c7980772fd980ff06384453d0df1c25ed4fe7e.zip
PR3558: mark "logically const" accessor methods in ASTContext as const,
and mark the fields they use as mutable. This allows us to remove a few const_casts. llvm-svn: 123314
Diffstat (limited to 'clang/lib/AST/DeclTemplate.cpp')
-rw-r--r--clang/lib/AST/DeclTemplate.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/AST/DeclTemplate.cpp b/clang/lib/AST/DeclTemplate.cpp
index 6e08854231a..6ad62eab30f 100644
--- a/clang/lib/AST/DeclTemplate.cpp
+++ b/clang/lib/AST/DeclTemplate.cpp
@@ -38,7 +38,7 @@ TemplateParameterList::TemplateParameterList(SourceLocation TemplateLoc,
}
TemplateParameterList *
-TemplateParameterList::Create(ASTContext &C, SourceLocation TemplateLoc,
+TemplateParameterList::Create(const ASTContext &C, SourceLocation TemplateLoc,
SourceLocation LAngleLoc, NamedDecl **Params,
unsigned NumParams, SourceLocation RAngleLoc) {
unsigned Size = sizeof(TemplateParameterList)
@@ -356,7 +356,7 @@ ClassTemplateDecl::getInjectedClassNameSpecialization() {
//===----------------------------------------------------------------------===//
TemplateTypeParmDecl *
-TemplateTypeParmDecl::Create(ASTContext &C, DeclContext *DC,
+TemplateTypeParmDecl::Create(const ASTContext &C, DeclContext *DC,
SourceLocation L, unsigned D, unsigned P,
IdentifierInfo *Id, bool Typename,
bool ParameterPack) {
@@ -365,7 +365,7 @@ TemplateTypeParmDecl::Create(ASTContext &C, DeclContext *DC,
}
TemplateTypeParmDecl *
-TemplateTypeParmDecl::Create(ASTContext &C, EmptyShell Empty) {
+TemplateTypeParmDecl::Create(const ASTContext &C, EmptyShell Empty) {
return new (C) TemplateTypeParmDecl(0, SourceLocation(), 0, false,
QualType(), false);
}
@@ -387,7 +387,7 @@ unsigned TemplateTypeParmDecl::getIndex() const {
//===----------------------------------------------------------------------===//
NonTypeTemplateParmDecl *
-NonTypeTemplateParmDecl::Create(ASTContext &C, DeclContext *DC,
+NonTypeTemplateParmDecl::Create(const ASTContext &C, DeclContext *DC,
SourceLocation L, unsigned D, unsigned P,
IdentifierInfo *Id, QualType T,
bool ParameterPack, TypeSourceInfo *TInfo) {
@@ -406,7 +406,7 @@ SourceLocation NonTypeTemplateParmDecl::getDefaultArgumentLoc() const {
//===----------------------------------------------------------------------===//
TemplateTemplateParmDecl *
-TemplateTemplateParmDecl::Create(ASTContext &C, DeclContext *DC,
+TemplateTemplateParmDecl::Create(const ASTContext &C, DeclContext *DC,
SourceLocation L, unsigned D, unsigned P,
bool ParameterPack, IdentifierInfo *Id,
TemplateParameterList *Params) {
OpenPOWER on IntegriCloud