diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-23 17:06:56 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-23 17:06:56 +0000 |
commit | 8441fffda14c5d9ac704f24173fcb117d4999a8e (patch) | |
tree | ab2edded238558aad2203848b1aac84d3afe64cc /lib/AST/NestedNameSpecifier.cpp | |
parent | f39c8859b087151617aa2c8b193d0b332503e3ca (diff) |
Add constness for NestedNameSpecifier::Create parameter
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/NestedNameSpecifier.cpp')
-rw-r--r-- | lib/AST/NestedNameSpecifier.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/AST/NestedNameSpecifier.cpp b/lib/AST/NestedNameSpecifier.cpp index 49b119b8e0..719df5984b 100644 --- a/lib/AST/NestedNameSpecifier.cpp +++ b/lib/AST/NestedNameSpecifier.cpp @@ -57,7 +57,8 @@ NestedNameSpecifier::Create(const ASTContext &Context, NestedNameSpecifier * NestedNameSpecifier::Create(const ASTContext &Context, - NestedNameSpecifier *Prefix, NamespaceDecl *NS) { + NestedNameSpecifier *Prefix, + const NamespaceDecl *NS) { assert(NS && "Namespace cannot be NULL"); assert((!Prefix || (Prefix->getAsType() == 0 && Prefix->getAsIdentifier() == 0)) && @@ -65,7 +66,7 @@ NestedNameSpecifier::Create(const ASTContext &Context, NestedNameSpecifier Mockup; Mockup.Prefix.setPointer(Prefix); Mockup.Prefix.setInt(StoredNamespaceOrAlias); - Mockup.Specifier = NS; + Mockup.Specifier = const_cast<NamespaceDecl *>(NS); return FindOrInsert(Context, Mockup); } |