]> granicus.if.org Git - clang/commitdiff
Name lookup should know better than to look into a class before it's defined
authorDouglas Gregor <dgregor@apple.com>
Tue, 12 Jan 2010 01:17:50 +0000 (01:17 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 12 Jan 2010 01:17:50 +0000 (01:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93217 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaLookup.cpp

index bff7881eb6b2f381a4a69cfcd27c81c0b0feb794..0ab01fe7f5d4b2365c5f9bf8359e3ab54c31268a 100644 (file)
@@ -460,7 +460,9 @@ static bool LookupDirect(LookupResult &R, const DeclContext *DC) {
     //   name lookup. Instead, any conversion function templates visible in the
     //   context of the use are considered. [...]
     const CXXRecordDecl *Record = cast<CXXRecordDecl>(DC);
-    
+    if (!Record->isDefinition())
+      return Found;
+
     const UnresolvedSet *Unresolved = Record->getConversionFunctions();
     for (UnresolvedSet::iterator U = Unresolved->begin(), 
                               UEnd = Unresolved->end();