aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-03-24 14:35:16 +0000
committerDouglas Gregor <dgregor@apple.com>2011-03-24 14:35:16 +0000
commit1d2de76c75fc1ac870c6df84c5368206c00d9a5e (patch)
tree20e64f48bea3cb2def747d9da75e8a2a6ef4fbbe /lib/Sema/SemaDecl.cpp
parent0b7e678a11ece4288dc01aebb5b17e5eef8f8d2d (diff)
Minor fix in the injection of labels, since we want to look at the redeclaration context of each declaration in the identifier chain. Should fix Linux self-host
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128210 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index a6c154338f..6f98461f44 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -500,7 +500,7 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) {
// isn't strictly lexical, which breaks name lookup. Be careful to insert
// the label at the appropriate place in the identifier chain.
for (I = IdResolver.begin(D->getDeclName()); I != IEnd; ++I) {
- DeclContext *IDC = (*I)->getLexicalDeclContext();
+ DeclContext *IDC = (*I)->getLexicalDeclContext()->getRedeclContext();
if (IDC == CurContext) {
if (!S->isDeclScope(*I))
continue;