summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index ec822212899..b938bd6f8b0 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -809,12 +809,6 @@ Sema::ActOnForwardProtocolDeclaration(SourceLocation AtProtocolLoc,
unsigned NumElts,
AttributeList *attrList) {
SmallVector<Decl *, 8> DeclsInGroup;
- if (isa<ObjCContainerDecl>(CurContext)) {
- Diag(AtProtocolLoc,
- diag::err_objc_decls_may_only_appear_in_global_scope);
- return BuildDeclaratorGroup(DeclsInGroup, false);
- }
-
for (unsigned i = 0; i != NumElts; ++i) {
IdentifierInfo *Ident = IdentList[i].first;
ObjCProtocolDecl *PrevDecl = LookupProtocol(Ident, IdentList[i].second,
@@ -1933,12 +1927,6 @@ Sema::ActOnForwardClassDeclaration(SourceLocation AtClassLoc,
SourceLocation *IdentLocs,
unsigned NumElts) {
SmallVector<Decl *, 8> DeclsInGroup;
- if (isa<ObjCContainerDecl>(CurContext)) {
- Diag(AtClassLoc,
- diag::err_objc_decls_may_only_appear_in_global_scope);
- return BuildDeclaratorGroup(DeclsInGroup, false);
- }
-
for (unsigned i = 0; i != NumElts; ++i) {
// Check for another declaration kind with the same name.
NamedDecl *PrevDecl
OpenPOWER on IntegriCloud