Chris Lattner | 4b00965 | 2007-07-25 00:24:17 +0000 | [diff] [blame] | 1 | // Note that the run lines are at the bottom of this file. |
| 2 | |
| 3 | #define_target TEST1 |
| 4 | TEST1 // diagnose |
| 5 | |
| 6 | #define_target TEST2 |
| 7 | #undef TEST2 |
| 8 | TEST2 // no diagnose |
| 9 | |
| 10 | #define_target TEST3 |
| 11 | #define TEST3 |
| 12 | TEST3 // no diagnose |
| 13 | |
| 14 | #define TEST4 |
| 15 | #define_target TEST4 |
| 16 | TEST4 // diagnose |
| 17 | |
| 18 | |
| 19 | // check success: |
| 20 | // RUN: clang -Eonly %s && |
| 21 | |
| 22 | // Check proper # of notes is emitted. |
| 23 | // RUN: clang -Eonly %s 2>&1 | grep note | wc -l | grep 2 && |
| 24 | |
| 25 | // Check that the diagnostics are the right ones. |
| 26 | // RUN: clang %s -Eonly -fno-caret-diagnostics 2>&1 | grep ':4:1: note' && |
| 27 | // RUN: clang %s -Eonly -fno-caret-diagnostics 2>&1 | grep ':16:1: note' |