Index: lib/AST/ASTImporter.cpp =================================================================== --- lib/AST/ASTImporter.cpp +++ lib/AST/ASTImporter.cpp @@ -2929,7 +2929,7 @@ if (!DC->isFunctionOrMethod() && SearchName) { SmallVector ConflictingDecls; SmallVector FoundDecls; - DC->getRedeclContext()->localUncachedLookup(Name, FoundDecls); + DC->getRedeclContext()->localUncachedLookup(SearchName, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (!FoundDecls[I]->isInIdentifierNamespace(IDNS)) continue; @@ -3018,7 +3018,7 @@ if (!DC->isFunctionOrMethod()) { SmallVector ConflictingDecls; SmallVector FoundDecls; - DC->getRedeclContext()->localUncachedLookup(Name, FoundDecls); + DC->getRedeclContext()->localUncachedLookup(SearchName, FoundDecls); for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) { if (!FoundDecls[I]->isInIdentifierNamespace(IDNS)) continue;