]> granicus.if.org Git - clang/commitdiff
Rename getStdNamespace -> getOrCreateStdNamespace, to better reflect its functionality.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 2 Aug 2010 07:14:39 +0000 (07:14 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 2 Aug 2010 07:14:39 +0000 (07:14 +0000)
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110030 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/Sema.h
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaExprCXX.cpp

index f676304b2fd12e0b1585769ab2e8fff59d3c1a1e..336dfa3763ee17b54144ede845a50102c471c8dd 100644 (file)
@@ -2167,7 +2167,7 @@ public:
                                            AttributeList *AttrList);
   virtual void ActOnFinishNamespaceDef(DeclPtrTy Dcl, SourceLocation RBrace);
 
-  NamespaceDecl *getStdNamespace();
+  NamespaceDecl *getOrCreateStdNamespace();
   virtual DeclPtrTy ActOnUsingDirective(Scope *CurScope,
                                         SourceLocation UsingLoc,
                                         SourceLocation NamespcLoc,
index d9215e5bbced1fad0f3d7e29fd16e60d33845637..cf6e354f3c4d56fd0d72ebc5e431530f57ce06e2 100644 (file)
@@ -3313,7 +3313,7 @@ void Sema::ActOnFinishNamespaceDef(DeclPtrTy D, SourceLocation RBrace) {
 
 /// \brief Retrieve the special "std" namespace, which may require us to 
 /// implicitly define the namespace.
-NamespaceDecl *Sema::getStdNamespace() {
+NamespaceDecl *Sema::getOrCreateStdNamespace() {
   if (!StdNamespace) {
     // The "std" namespace has not yet been defined, so build one implicitly.
     StdNamespace = NamespaceDecl::Create(Context, 
@@ -3355,7 +3355,7 @@ Sema::DeclPtrTy Sema::ActOnUsingDirective(Scope *S,
     if ((!Qualifier || Qualifier->getKind() == NestedNameSpecifier::Global) &&
         NamespcName->isStr("std")) {
       Diag(IdentLoc, diag::ext_using_undefined_std);
-      R.addDecl(getStdNamespace());
+      R.addDecl(getOrCreateStdNamespace());
       R.resolveKind();
     } 
     // Otherwise, attempt typo correction.
index d9f7c13f3debfb1eb05f2e6b1e4643264e64440f..d607afac1665ae105870f4258bbbac909a49b2e6 100644 (file)
@@ -1199,7 +1199,7 @@ void Sema::DeclareGlobalNewDelete() {
     // The "std::bad_alloc" class has not yet been declared, so build it
     // implicitly.
     StdBadAlloc = CXXRecordDecl::Create(Context, TTK_Class, 
-                                        getStdNamespace(), 
+                                        getOrCreateStdNamespace(), 
                                         SourceLocation(), 
                                       &PP.getIdentifierTable().get("bad_alloc"), 
                                         SourceLocation(), 0);