[cfe-commits] r173274 - in /cfe/trunk: include/clang/AST/NestedNameSpecifier.h lib/AST/NestedNameSpecifier.cpp
Dmitri Gribenko
gribozavr at gmail.com
Wed Jan 23 09:06:56 PST 2013
Author: gribozavr
Date: Wed Jan 23 11:06:56 2013
New Revision: 173274
URL: http://llvm.org/viewvc/llvm-project?rev=173274&view=rev
Log:
Add constness for NestedNameSpecifier::Create parameter
Modified:
cfe/trunk/include/clang/AST/NestedNameSpecifier.h
cfe/trunk/lib/AST/NestedNameSpecifier.cpp
Modified: cfe/trunk/include/clang/AST/NestedNameSpecifier.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/NestedNameSpecifier.h?rev=173274&r1=173273&r2=173274&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/NestedNameSpecifier.h (original)
+++ cfe/trunk/include/clang/AST/NestedNameSpecifier.h Wed Jan 23 11:06:56 2013
@@ -117,7 +117,7 @@
/// \brief Builds a nested name specifier that names a namespace.
static NestedNameSpecifier *Create(const ASTContext &Context,
NestedNameSpecifier *Prefix,
- NamespaceDecl *NS);
+ const NamespaceDecl *NS);
/// \brief Builds a nested name specifier that names a namespace alias.
static NestedNameSpecifier *Create(const ASTContext &Context,
Modified: cfe/trunk/lib/AST/NestedNameSpecifier.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/NestedNameSpecifier.cpp?rev=173274&r1=173273&r2=173274&view=diff
==============================================================================
--- cfe/trunk/lib/AST/NestedNameSpecifier.cpp (original)
+++ cfe/trunk/lib/AST/NestedNameSpecifier.cpp Wed Jan 23 11:06:56 2013
@@ -57,7 +57,8 @@
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 Mockup;
Mockup.Prefix.setPointer(Prefix);
Mockup.Prefix.setInt(StoredNamespaceOrAlias);
- Mockup.Specifier = NS;
+ Mockup.Specifier = const_cast<NamespaceDecl *>(NS);
return FindOrInsert(Context, Mockup);
}
More information about the cfe-commits
mailing list