xref: /aosp_15_r20/external/clang/test/Parser/objc-messaging-1.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: %clang_cc1 %s -fsyntax-only -verify
2*67e74705SXin Liint main ()
3*67e74705SXin Li{
4*67e74705SXin Li	int i,j;
5*67e74705SXin Li	struct S *p;
6*67e74705SXin Li        id a, b, c;
7*67e74705SXin Li	[a ii]; // expected-warning{{not found}}
8*67e74705SXin Li	[a if: 1 :2]; // expected-warning{{not found}}
9*67e74705SXin Li	[a inout: 1 :2 another:(2,3,4)]; // expected-warning{{not found}} \
10*67e74705SXin Li           // expected-warning 2{{expression result unused}}
11*67e74705SXin Li	[a inout: 1 :2 another:(2,3,4), 6,6,8]; // expected-warning{{not found}} \
12*67e74705SXin Li           // expected-warning 2{{expression result unused}}
13*67e74705SXin Li	[a inout: 1 :2 another:(2,3,4), (6,4,5),6,8]; // expected-warning{{not found}} \
14*67e74705SXin Li           // expected-warning 4{{expression result unused}}
15*67e74705SXin Li	[a inout: 1 :2 another:(i+10), (i,j-1,5),6,8]; // expected-warning{{not found}} \
16*67e74705SXin Li           // expected-warning 2{{expression result unused}}
17*67e74705SXin Li	[a long: 1 :2 another:(i+10), (i,j-1,5),6,8]; // expected-warning{{not found}} \
18*67e74705SXin Li           // expected-warning 2{{expression result unused}}
19*67e74705SXin Li	[a : "Hello\n" :2 another:(i+10), (i,j-1,5),6,8]; // expected-warning{{not found}} \
20*67e74705SXin Li           // expected-warning 2{{expression result unused}}
21*67e74705SXin Li
22*67e74705SXin Li	// Comma expression as receiver (rdar://6222856)
23*67e74705SXin Li	[a, b, c foo]; // expected-warning{{not found}} \
24*67e74705SXin Li           // expected-warning 2{{expression result unused}}
25*67e74705SXin Li
26*67e74705SXin Li}
27