1 // RUN: clang-cc -fsyntax-only -verify %s
5 @protocol P; //expected-error{{Objective-C declarations may only appear in global scope}}
7 @class Bar; //expected-error{{Objective-C declarations may only appear in global scope}}
9 @compatibility_alias Foo Bar; //expected-error{{Objective-C declarations may only appear in global scope}}
11 @interface A //expected-error{{Objective-C declarations may only appear in global scope}}
14 @implementation A //expected-error{{Objective-C declarations may only appear in global scope}}
17 @protocol P //expected-error{{Objective-C declarations may only appear in global scope}}
20 @interface A(C) //expected-error{{Objective-C declarations may only appear in global scope}}
23 @implementation A(C) //expected-error{{Objective-C declarations may only appear in global scope}}