Douglas Gregor | ec0411d | 2010-07-26 04:08:02 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -fsyntax-only -verify |
Fariborz Jahanian | d4462f9 | 2007-09-05 23:08:20 +0000 | [diff] [blame] | 2 | int main () |
| 3 | { |
| 4 | int i,j; |
| 5 | struct S *p; |
Chris Lattner | c185e1a | 2008-09-19 17:44:00 +0000 | [diff] [blame] | 6 | id a, b, c; |
Douglas Gregor | ec0411d | 2010-07-26 04:08:02 +0000 | [diff] [blame] | 7 | [a ii]; // expected-warning{{not found}} |
| 8 | [a if: 1 :2]; // expected-warning{{not found}} |
| 9 | [a inout: 1 :2 another:(2,3,4)]; // expected-warning{{not found}} \ |
| 10 | // expected-warning 2{{expression result unused}} |
| 11 | [a inout: 1 :2 another:(2,3,4), 6,6,8]; // expected-warning{{not found}} \ |
| 12 | // expected-warning 2{{expression result unused}} |
| 13 | [a inout: 1 :2 another:(2,3,4), (6,4,5),6,8]; // expected-warning{{not found}} \ |
| 14 | // expected-warning 4{{expression result unused}} |
| 15 | [a inout: 1 :2 another:(i+10), (i,j-1,5),6,8]; // expected-warning{{not found}} \ |
| 16 | // expected-warning 2{{expression result unused}} |
| 17 | [a long: 1 :2 another:(i+10), (i,j-1,5),6,8]; // expected-warning{{not found}} \ |
| 18 | // expected-warning 2{{expression result unused}} |
| 19 | [a : "Hello\n" :2 another:(i+10), (i,j-1,5),6,8]; // expected-warning{{not found}} \ |
| 20 | // expected-warning 2{{expression result unused}} |
Chris Lattner | c185e1a | 2008-09-19 17:44:00 +0000 | [diff] [blame] | 21 | |
| 22 | // Comma expression as receiver (rdar://6222856) |
Douglas Gregor | ec0411d | 2010-07-26 04:08:02 +0000 | [diff] [blame] | 23 | [a, b, c foo]; // expected-warning{{not found}} \ |
| 24 | // expected-warning 2{{expression result unused}} |
Chris Lattner | c185e1a | 2008-09-19 17:44:00 +0000 | [diff] [blame] | 25 | |
Fariborz Jahanian | d4462f9 | 2007-09-05 23:08:20 +0000 | [diff] [blame] | 26 | } |