1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wno-objc-root-class -Wno-incomplete-implementation -triple x86_64-apple-macosx10.10.0 -verify %s
6 int throw; // expected-error {{expected member name or ';' after declaration specifiers; 'throw' is a keyword in Objective-C++}}
9 @interface class // expected-error {{expected identifier; 'class' is a keyword in Objective-C++}}
12 @interface Bar: class // expected-error {{expected identifier; 'class' is a keyword in Objective-C++}}
18 @protocol new // expected-error {{expected identifier; 'new' is a keyword in Objective-C++}}
22 @protocol delete // expected-error {{expected identifier; 'delete' is a keyword in Objective-C++}}
25 @class Foo, try; // expected-error {{expected identifier; 'try' is a keyword in Objective-C++}}
29 @property (readwrite, nonatomic) int a, b, throw; // expected-error {{expected member name or ';' after declaration specifiers; 'throw' is a keyword in Objective-C++}}
31 -foo:(int)class; // expected-error {{expected identifier; 'class' is a keyword in Objective-C++}}
32 +foo:(int)constexpr; // expected-error {{expected identifier; 'constexpr' is a keyword in Objective-C++}}
36 @interface Foo () <P, new> // expected-error {{expected identifier; 'new' is a keyword in Objective-C++}}
41 @synthesize a = _a; // ok
42 @synthesize b = virtual; // expected-error {{expected identifier; 'virtual' is a keyword in Objective-C++}}
44 @dynamic throw; // expected-error {{expected identifier; 'throw' is a keyword in Objective-C++}}
46 -foo:(int)class { // expected-error {{expected identifier; 'class' is a keyword in Objective-C++}}
51 @implementation class // expected-error {{expected identifier; 'class' is a keyword in Objective-C++}}
54 @implementation Bar: class // expected-error {{expected identifier; 'class' is a keyword in Objective-C++}}
57 @compatibility_alias C Foo; // ok
58 @compatibility_alias const_cast Bar; // expected-error {{expected identifier; 'const_cast' is a keyword in Objective-C++}}
59 @compatibility_alias C2 class; // expected-error {{expected identifier; 'class' is a keyword in Objective-C++}}
62 (void)@protocol(P); // ok
63 (void)@protocol(delete); // expected-error {{expected identifier; 'delete' is a keyword in Objective-C++}}