diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-03-24 14:35:16 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-03-24 14:35:16 +0000 |
commit | 1d2de76c75fc1ac870c6df84c5368206c00d9a5e (patch) | |
tree | 20e64f48bea3cb2def747d9da75e8a2a6ef4fbbe /lib/Sema/SemaDecl.cpp | |
parent | 0b7e678a11ece4288dc01aebb5b17e5eef8f8d2d (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.cpp | 2 |
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; |