diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-01-03 23:34:23 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-01-03 23:34:23 +0000 |
commit | 3f26e0fdcdb58742b7d7871cb42b6a28e7847262 (patch) | |
tree | 0264d2e89ad10bdb0c3457b778e52f88e8af0a27 /lib/Sema/SemaLookup.cpp | |
parent | 7a537404f039d4b7d063bbdc3c8c924be977dff2 (diff) |
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
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r-- | lib/Sema/SemaLookup.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index f836a077b6..48ae1b970d 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -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); } |