Properly pop out of Objective-C method declarations when they are (ill-formedly)
found within contexts other than the translation unit.
llvm-svn: 110417
diff --git a/clang/test/SemaObjCXX/objc-decls-inside-namespace.mm b/clang/test/SemaObjCXX/objc-decls-inside-namespace.mm
index 9953ec3..f68078b 100644
--- a/clang/test/SemaObjCXX/objc-decls-inside-namespace.mm
+++ b/clang/test/SemaObjCXX/objc-decls-inside-namespace.mm
@@ -23,5 +23,10 @@
@implementation A(C) //expected-error{{Objective-C declarations may only appear in global scope}}
@end
+@interface B @end //expected-error{{Objective-C declarations may only appear in global scope}}
+@implementation B //expected-error{{Objective-C declarations may only appear in global scope}}
++ (void) foo {}
+@end
+
}