[cfe-commits] r112562 - /cfe/trunk/lib/AST/DeclBase.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Mon Aug 30 17:36:23 PDT 2010


Author: cornedbee
Date: Mon Aug 30 19:36:23 2010
New Revision: 112562

URL: http://llvm.org/viewvc/llvm-project?rev=112562&view=rev
Log:
Decl::getEnclosingNamespaceContext has no reason to explicitly skip transparent contexts, and would be wrong to do so with inline namespaces.

Modified:
    cfe/trunk/lib/AST/DeclBase.cpp

Modified: cfe/trunk/lib/AST/DeclBase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclBase.cpp?rev=112562&r1=112561&r2=112562&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclBase.cpp (original)
+++ cfe/trunk/lib/AST/DeclBase.cpp Mon Aug 30 19:36:23 2010
@@ -858,7 +858,7 @@
 DeclContext *DeclContext::getEnclosingNamespaceContext() {
   DeclContext *Ctx = this;
   // Skip through non-namespace, non-translation-unit contexts.
-  while (!Ctx->isFileContext() || Ctx->isTransparentContext())
+  while (!Ctx->isFileContext())
     Ctx = Ctx->getParent();
   return Ctx->getPrimaryContext();
 }





More information about the cfe-commits mailing list