Chris Lattner | c9c042c | 2009-05-06 06:00:28 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only %s > %t 2>&1 && |
Chris Lattner | 037fb7f | 2009-05-05 22:03:18 +0000 | [diff] [blame] | 2 | |
| 3 | #define M1(x) x |
| 4 | |
| 5 | // RUN: grep ":6:12: note: instantiated from:" %t && |
| 6 | #define M2 1; |
| 7 | |
| 8 | void foo() { |
| 9 | // RUN: grep ":10:2: warning: expression result unused" %t && |
| 10 | M1( |
| 11 | // RUN: grep ":12:5: note: instantiated from:" %t && |
| 12 | M2) |
| 13 | } |
| 14 | |
| 15 | // RUN: grep ":16:11: note: instantiated from:" %t && |
| 16 | #define A 1 |
| 17 | // RUN: grep ":18:11: note: instantiated from:" %t && |
| 18 | #define B A |
| 19 | // RUN: grep ":20:11: note: instantiated from:" %t && |
| 20 | #define C B |
| 21 | |
| 22 | void bar() { |
| 23 | // RUN: grep ":24:3: warning: expression result unused" %t |
| 24 | C; |
| 25 | } |
| 26 | |