Index: tools/clang/lib/Sema/SemaLookup.cpp
===================================================================
--- tools/clang/lib/Sema/SemaLookup.cpp	(revision 47284)
+++ tools/clang/lib/Sema/SemaLookup.cpp	(working copy)
@@ -1207,8 +1207,14 @@
       }
   } else {
     // Perform C++ unqualified name lookup.
-    if (CppLookupName(R, S))
+    if (CppLookupName(R, S)) {
+      if (R.isSingleResult())
+        if (const TagDecl *TD = dyn_cast<TagDecl>(R.getFoundDecl())) {
+          if (!TD->isThisDeclarationADefinition() && ExternalSource)
+            ExternalSource->LookupUnqualified(R, S);
+        }
       return true;
+    }
   }
 
   // If we didn't find a use of this identifier, and if the identifier

Patch allowing if the found decl is fwd declare it asks the autoloader to try to find full one.
Patch allowing if the found decl is fwd declare it asks the autoloader to try to find full one.


git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@47301 27541ba8-7e3a-0410-8455-c3a389f83636
