1 // RUN: %clang_cc1 -fsyntax-only %s -verify
2 // RUN: %clang_cc1 -fsyntax-only -std=c++98 %s -verify
3 // RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify
6 template<typename T, typename U> class pair;
12 @interface Test : NSObject
18 } // expected-error {{expected ';' after struct}}
20 typedef std::pair<int, int> IntegerPair;
22 template<typename...Ts> void f(Ts); // expected-error {{unexpanded}}
23 #if __cplusplus <= 199711L // C++03 or earlier modes
24 // expected-warning@-2 {{variadic templates are a C++11 extension}}
29 typedef int InnerType;
33 typedef int InnerType;
36 @protocol InvalidProperties
38 @property (nonatomic) (OuterType::InnerType) invalidTypeParens;
39 // expected-error@-1 {{type name requires a specifier or qualifier}}
40 // expected-error@-2 {{property requires fields to be named}}
41 // expected-error@-3 {{expected ';' at end of declaration list}}
42 // expected-error@-4 {{a type specifier is required for all declarations}}
43 // expected-error@-5 {{cannot declare variable inside @interface or @protocol}}
45 @property (nonatomic) (ns::InnerType) invalidTypeParens2;
46 // expected-error@-1 {{type name requires a specifier or qualifier}}
47 // expected-error@-2 {{property requires fields to be named}}
48 // expected-error@-3 {{expected ';' at end of declaration list}}
49 // expected-error@-4 {{a type specifier is required for all declarations}}
50 // expected-error@-5 {{cannot declare variable inside @interface or @protocol}}
52 @property (nonatomic) int OuterType::InnerType; // expected-error {{property requires fields to be named}}
54 @property (nonatomic) int OuterType::InnerType foo; // expected-error {{property requires fields to be named}}
55 // expected-error@-1 {{expected ';' at end of declaration list}}
56 // expected-error@-2 {{a type specifier is required for all declarations}}
57 // expected-error@-3 {{cannot declare variable inside @interface or @protocol}}
61 // This used to crash.
67 id<Property0> z = true ? x : y;