r202771 - Fix typo that resulted in names at TU scope getting lost sometimes after a
Richard Smith
richard-llvm at metafoo.co.uk
Mon Mar 3 16:21:15 PST 2014
Author: rsmith
Date: Mon Mar 3 18:21:14 2014
New Revision: 202771
URL: http://llvm.org/viewvc/llvm-project?rev=202771&view=rev
Log:
Fix typo that resulted in names at TU scope getting lost sometimes after a
module import.
Modified:
cfe/trunk/lib/AST/DeclBase.cpp
cfe/trunk/test/Modules/Inputs/namespaces-left.h
Modified: cfe/trunk/lib/AST/DeclBase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclBase.cpp?rev=202771&r1=202770&r2=202771&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclBase.cpp (original)
+++ cfe/trunk/lib/AST/DeclBase.cpp Mon Mar 3 18:21:14 2014
@@ -1293,7 +1293,7 @@ DeclContext::lookup(DeclarationName Name
return R.first->second.getLookupResult();
ExternalASTSource *Source = getParentASTContext().getExternalSource();
- if (Source->FindExternalVisibleDeclsByName(this, Name) || R.second) {
+ if (Source->FindExternalVisibleDeclsByName(this, Name) || !R.second) {
if (StoredDeclsMap *Map = LookupPtr.getPointer()) {
StoredDeclsMap::iterator I = Map->find(Name);
if (I != Map->end())
Modified: cfe/trunk/test/Modules/Inputs/namespaces-left.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/namespaces-left.h?rev=202771&r1=202770&r2=202771&view=diff
==============================================================================
--- cfe/trunk/test/Modules/Inputs/namespaces-left.h (original)
+++ cfe/trunk/test/Modules/Inputs/namespaces-left.h Mon Mar 3 18:21:14 2014
@@ -1,5 +1,13 @@
+namespace RedeclAcrossImport {
+ enum E { e };
+}
+
@import namespaces_top;
+namespace RedeclAcrossImport {
+ E x = e;
+}
+
float &global(float);
float &global2(float);
More information about the cfe-commits
mailing list