summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commitd7d7e0d3dffd7c117ea8bbe3697bb91a5a0ab7ab (patch)
tree73fc606f90f3f7e98ba9f52e22f02a8e1fcf29fb /clang/lib
parent084e83dfe7e4e531fda9abefa5396c643ffc2a36 (diff)
downloadbcm5719-llvm-d7d7e0d3dffd7c117ea8bbe3697bb91a5a0ab7ab.tar.gz
bcm5719-llvm-d7d7e0d3dffd7c117ea8bbe3697bb91a5a0ab7ab.zip
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
llvm-svn: 128210
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index a6c154338f4..6f98461f44d 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud