summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-01-06 23:51:29 +0000
committerDouglas Gregor <dgregor@apple.com>2009-01-06 23:51:29 +0000
commit6ad0ef50918ed9cefff5fefb37d4f6dc2fac2343 (patch)
tree56e7cd61b0d1d20a40f4edb5097519c9e3af9537 /clang/lib/Sema/SemaDeclObjC.cpp
parent44a3da6c4dc98e9303c07836257ced0bc4a12cbb (diff)
downloadbcm5719-llvm-6ad0ef50918ed9cefff5fefb37d4f6dc2fac2343.tar.gz
bcm5719-llvm-6ad0ef50918ed9cefff5fefb37d4f6dc2fac2343.zip
Allow Objective-C entities to be declared within a transparent context
nested in the translation unit. This fixes <rdar://problem/6476070>. llvm-svn: 61832
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index cf1a5259f20..c32a806b7d1 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -1647,7 +1647,7 @@ Sema::DeclTy *Sema::ActOnPropertyImplDecl(SourceLocation AtLoc,
}
bool Sema::CheckObjCDeclScope(Decl *D) {
- if (isa<TranslationUnitDecl>(CurContext))
+ if (isa<TranslationUnitDecl>(CurContext->getLookupContext()))
return false;
Diag(D->getLocation(), diag::err_objc_decls_may_only_appear_in_global_scope);
OpenPOWER on IntegriCloud