[cfe-commits] r93217 - /cfe/trunk/lib/Sema/SemaLookup.cpp
Douglas Gregor
dgregor at apple.com
Mon Jan 11 17:17:50 PST 2010
Author: dgregor
Date: Mon Jan 11 19:17:50 2010
New Revision: 93217
URL: http://llvm.org/viewvc/llvm-project?rev=93217&view=rev
Log:
Name lookup should know better than to look into a class before it's defined
Modified:
cfe/trunk/lib/Sema/SemaLookup.cpp
Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=93217&r1=93216&r2=93217&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Mon Jan 11 19:17:50 2010
@@ -460,7 +460,9 @@
// 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();
More information about the cfe-commits
mailing list