diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-09-24 17:03:07 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-09-24 17:03:07 +0000 |
commit | 0dded8ab04026291237a9e7215a421ead742c62e (patch) | |
tree | 38bdd2f6817a06d6d353ae99312d06ead365cea3 /clang/lib/Sema/SemaDeclObjC.cpp | |
parent | fd4777c046f8eba820c27cbcf5072b6ad0a95a8d (diff) | |
download | bcm5719-llvm-0dded8ab04026291237a9e7215a421ead742c62e.tar.gz bcm5719-llvm-0dded8ab04026291237a9e7215a421ead742c62e.zip |
Revert my patch in r191155 to allow forward
class/protocol decls in @implementation and
fixup modern rewriter to handle that.
// rdar://15066233
llvm-svn: 191311
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 12 |
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 |