зеркало из https://github.com/microsoft/clang-1.git
Minor tweak to name lookup for C/Objective-C: after the first name, still consider whether this is a redeclaration lookup when determining whether to look for the visible declaration
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147499 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
7a537404f0
Коммит
3f26e0fdcd
|
@ -1196,7 +1196,7 @@ bool Sema::LookupName(LookupResult &R, Scope *S, bool AllowBuiltinCreation) {
|
|||
if (!(*LastI)->isInIdentifierNamespace(IDNS))
|
||||
continue;
|
||||
|
||||
D = getVisibleDecl(*LastI);
|
||||
D = R.isForRedeclaration()? *LastI : getVisibleDecl(*LastI);
|
||||
if (D)
|
||||
R.addDecl(D);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче