Name lookup should know better than to look into a class before it's defined

llvm-svn: 93217
This commit is contained in:
Douglas Gregor 2010-01-12 01:17:50 +00:00
parent c54cf7373f
commit 3c96a46fc3
1 changed files with 3 additions and 1 deletions

View 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();