diff options
| author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-23 16:52:57 +0000 |
|---|---|---|
| committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-23 16:52:57 +0000 |
| commit | b53f37c97882dbce1b717b40ec5bcc5630b2784d (patch) | |
| tree | f9cc48df31343fbed2e0e74e0f0aa3027531bd9f /clang/lib | |
| parent | 32aab2216d2f0e21d1aa48b07800701579ade7e8 (diff) | |
| download | bcm5719-llvm-b53f37c97882dbce1b717b40ec5bcc5630b2784d.tar.gz bcm5719-llvm-b53f37c97882dbce1b717b40ec5bcc5630b2784d.zip | |
Constify some getters in RedeclarableTemplateDecl
llvm-svn: 173272
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/AST/DeclTemplate.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/AST/DeclTemplate.cpp b/clang/lib/AST/DeclTemplate.cpp index 63616e064a9..bd5ab8a5b9b 100644 --- a/clang/lib/AST/DeclTemplate.cpp +++ b/clang/lib/AST/DeclTemplate.cpp @@ -128,12 +128,12 @@ static void AdoptTemplateParameterList(TemplateParameterList *Params, // RedeclarableTemplateDecl Implementation //===----------------------------------------------------------------------===// -RedeclarableTemplateDecl::CommonBase *RedeclarableTemplateDecl::getCommonPtr() { +RedeclarableTemplateDecl::CommonBase *RedeclarableTemplateDecl::getCommonPtr() const { if (!Common) { // Walk the previous-declaration chain until we either find a declaration // with a common pointer or we run out of previous declarations. - SmallVector<RedeclarableTemplateDecl *, 2> PrevDecls; - for (RedeclarableTemplateDecl *Prev = getPreviousDecl(); Prev; + SmallVector<const RedeclarableTemplateDecl *, 2> PrevDecls; + for (const RedeclarableTemplateDecl *Prev = getPreviousDecl(); Prev; Prev = Prev->getPreviousDecl()) { if (Prev->Common) { Common = Prev->Common; @@ -241,7 +241,7 @@ FunctionTemplateDecl *FunctionTemplateDecl::CreateDeserialized(ASTContext &C, } RedeclarableTemplateDecl::CommonBase * -FunctionTemplateDecl::newCommon(ASTContext &C) { +FunctionTemplateDecl::newCommon(ASTContext &C) const { Common *CommonPtr = new (C) Common; C.AddDeallocation(DeallocateCommon, CommonPtr); return CommonPtr; @@ -328,7 +328,7 @@ ClassTemplateDecl::getPartialSpecializations() { } RedeclarableTemplateDecl::CommonBase * -ClassTemplateDecl::newCommon(ASTContext &C) { +ClassTemplateDecl::newCommon(ASTContext &C) const { Common *CommonPtr = new (C) Common; C.AddDeallocation(DeallocateCommon, CommonPtr); return CommonPtr; @@ -919,7 +919,7 @@ void TypeAliasTemplateDecl::DeallocateCommon(void *Ptr) { static_cast<Common *>(Ptr)->~Common(); } RedeclarableTemplateDecl::CommonBase * -TypeAliasTemplateDecl::newCommon(ASTContext &C) { +TypeAliasTemplateDecl::newCommon(ASTContext &C) const { Common *CommonPtr = new (C) Common; C.AddDeallocation(DeallocateCommon, CommonPtr); return CommonPtr; |

