summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-01-20 02:26:24 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-01-20 02:26:24 +0000
commit9e976dcce83d3b00f5a1642bd6d5aee846392c90 (patch)
treeb0eae556a104c8d723eaccf0be1214a3b24d264e /clang/lib/Sema/SemaDecl.cpp
parent77787033b9cbecf9c444c26221374f96bd1fd521 (diff)
downloadbcm5719-llvm-9e976dcce83d3b00f5a1642bd6d5aee846392c90.tar.gz
bcm5719-llvm-9e976dcce83d3b00f5a1642bd6d5aee846392c90.zip
Fix PR8884 by skipping transparent contexts. The test is for LikageSpec. I
failed to find a case where an enum context would make a difference, but found PR9007 on the way. llvm-svn: 123871
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-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 6bbbd541c2a..d28548dc2f5 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -5991,7 +5991,7 @@ Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK,
// Find the context where we'll be declaring the tag.
// FIXME: We would like to maintain the current DeclContext as the
// lexical context,
- while (SearchDC->isRecord())
+ while (SearchDC->isRecord() || SearchDC->isTransparentContext())
SearchDC = SearchDC->getParent();
// Find the scope where we'll be declaring the tag.
OpenPOWER on IntegriCloud