aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-01-17 18:52:07 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-01-17 18:52:07 +0000
commit6b81b0d82a78740b3fb69bacf5d729b6f9374dac (patch)
tree0e376c374bd92ff6bcf32ee771ba6577bb4693d0 /lib/Sema/SemaDecl.cpp
parent7fe90f3bfa6bd7f779ecfd4ba201a296a3a1c8cb (diff)
objc: fixes a bug where struct used inside an
objc class was not being exported to parent decl context resulting in bogus mismatch warning later on. // rdar://10655530 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148320 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 6196ea3f6c..0e99f70476 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -7872,7 +7872,8 @@ 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() || SearchDC->isTransparentContext())
+ while (SearchDC->isRecord() || SearchDC->isTransparentContext() ||
+ SearchDC->isObjCContainer())
SearchDC = SearchDC->getParent();
// Find the scope where we'll be declaring the tag.