]> granicus.if.org Git - clang/commitdiff
Fix typo that resulted in names at TU scope getting lost sometimes after a
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 4 Mar 2014 00:21:14 +0000 (00:21 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 4 Mar 2014 00:21:14 +0000 (00:21 +0000)
module import.

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

lib/AST/DeclBase.cpp
test/Modules/Inputs/namespaces-left.h

index 6c9d5ca76c8b1d51426ecdb927548cd25fa3eb16..2ca491194ddf691cd8564736a9bfcb9fed43f3f8 100644 (file)
@@ -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())
index bd192afd2e89764e21fbc56dfff5a3bbb3400bdb..fa93af274650a2f86d555e3f1acd8dcdcfa2cf93 100644 (file)
@@ -1,5 +1,13 @@
+namespace RedeclAcrossImport {
+  enum E { e };
+}
+
 @import namespaces_top;
 
+namespace RedeclAcrossImport {
+  E x = e;
+}
+
 float &global(float);
 float &global2(float);