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
4 int throw; // expected-error {{expected member name or ';' after declaration specifiers; 'throw' is a keyword in Objective-C++}}
7 @interface class // expected-error {{expected identifier; 'class' is a keyword in Objective-C++}}
10 @interface Bar: class // expected-error {{expected identifier; 'class' is a keyword in Objective-C++}}
16 @protocol new // expected-error {{expected identifier; 'new' is a keyword in Objective-C++}}
20 @protocol delete // expected-error {{expected identifier; 'delete' is a keyword in Objective-C++}}
23 @class Foo, try; // expected-error {{expected identifier; 'try' is a keyword in Objective-C++}}
27 @property (readwrite, nonatomic) int a, b, throw; // expected-error {{expected member name or ';' after declaration specifiers; 'throw' is a keyword in Objective-C++}}
29 -foo:(int)class; // expected-error {{expected identifier; 'class' is a keyword in Objective-C++}}
30 +foo:(int)constexpr; // expected-error {{expected identifier; 'constexpr' is a keyword in Objective-C++}}
34 @interface Foo () <P, new> // expected-error {{expected identifier; 'new' is a keyword in Objective-C++}}
39 @synthesize a = _a; // ok
40 @synthesize b = virtual; // expected-error {{expected identifier; 'virtual' is a keyword in Objective-C++}}
42 @dynamic throw; // expected-error {{expected identifier; 'throw' is a keyword in Objective-C++}}
44 -foo:(int)class { // expected-error {{expected identifier; 'class' is a keyword in Objective-C++}}
49 @implementation class // expected-error {{expected identifier; 'class' is a keyword in Objective-C++}}
52 @implementation Bar: class // expected-error {{expected identifier; 'class' is a keyword in Objective-C++}}
55 @compatibility_alias C Foo; // ok
56 @compatibility_alias const_cast Bar; // expected-error {{expected identifier; 'const_cast' is a keyword in Objective-C++}}
57 @compatibility_alias C2 class; // expected-error {{expected identifier; 'class' is a keyword in Objective-C++}}
60 (void)@protocol(P); // ok
61 (void)@protocol(delete); // expected-error {{expected identifier; 'delete' is a keyword in Objective-C++}}