xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/severe-syntax-error.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
2*f4a2713aSLionel Sambuc// rdar://10633434
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc@interface testClass
5*f4a2713aSLionel Sambuc@end
6*f4a2713aSLionel Sambuc
7*f4a2713aSLionel Sambuc@class NSArray;
8*f4a2713aSLionel Sambuc
9*f4a2713aSLionel Sambuc@implementation testClass
10*f4a2713aSLionel Sambuc
11*f4a2713aSLionel Sambucstatic NSArray* prefixArray[] = @"BEGIN:", @"END:", @"VERSION:", @"N:", @"FN:", @"TEL;", @"TEL:", nil; // expected-error {{array initializer must be an initializer list}} \
12*f4a2713aSLionel Sambuc												       // expected-error {{expected identifier or '('}} \
13*f4a2713aSLionel Sambuc												       // expected-error {{expected ';' after top level declarator}}
14*f4a2713aSLionel Sambuc
15*f4a2713aSLionel Sambucstatic NSString* prefixArray1[] = @"BEGIN:", @"END:", @"VERSION:", @"N:", @"FN:", @"TEL;", @"TEL:", nil; // expected-error {{unknown type name 'NSString'}} \
16*f4a2713aSLionel Sambuc													 // expected-error {{expected identifier or '('}} \
17*f4a2713aSLionel Sambuc													 // expected-error {{expected ';' after top level declarator}}
18*f4a2713aSLionel Sambuc
19*f4a2713aSLionel Sambucstatic char* cArray[] = "BEGIN:", "END";	// expected-error {{array initializer must be an initializer list}} \
20*f4a2713aSLionel Sambuc						// expected-error {{expected identifier or '('}} \
21*f4a2713aSLionel Sambuc						// expected-error {{expected ';' after top level declarator}}
22*f4a2713aSLionel Sambuc
23*f4a2713aSLionel Sambuc@end
24