xref: /aosp_15_r20/external/clang/test/Parser/check-syntax-1.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: %clang_cc1 -fsyntax-only -verify %s
2*67e74705SXin Li
3*67e74705SXin Liint @interface bla  ; // expected-error {{cannot combine with previous 'int' declaration specifier}}
4*67e74705SXin Li@end
5*67e74705SXin Li
6*67e74705SXin Litypedef float CGFloat;
7*67e74705SXin Li@interface XNSNumber
8*67e74705SXin Li+ (XNSNumber *) numberWithCGFloat  : (CGFloat) float; // expected-error {{expected identifier}}  \
9*67e74705SXin Li                                                      // expected-error {{expected ';' after method prototype}}
10*67e74705SXin Li@end
11*67e74705SXin Li
12*67e74705SXin Li// rdar: // 7822196
13*67e74705SXin Li@interface A
14*67e74705SXin Li(void) x;	// expected-error {{method type specifier must start with '-' or '+'}}
15*67e74705SXin Li(int)im; // expected-error {{method type specifier must start with '-' or '+'}} \
16*67e74705SXin Li- ok;
17*67e74705SXin Li@end
18*67e74705SXin Li
19*67e74705SXin Li
20