[cfe-commits] r147499 - /cfe/trunk/lib/Sema/SemaLookup.cpp
Douglas Gregor
dgregor at apple.com
Tue Jan 3 15:34:23 PST 2012
Author: dgregor
Date: Tue Jan 3 17:34:23 2012
New Revision: 147499
URL: http://llvm.org/viewvc/llvm-project?rev=147499&view=rev
Log:
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
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=147499&r1=147498&r2=147499&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Tue Jan 3 17:34:23 2012
@@ -1196,7 +1196,7 @@
if (!(*LastI)->isInIdentifierNamespace(IDNS))
continue;
- D = getVisibleDecl(*LastI);
+ D = R.isForRedeclaration()? *LastI : getVisibleDecl(*LastI);
if (D)
R.addDecl(D);
}
More information about the cfe-commits
mailing list