blob: 85a132f557663e8c8143ea46e83b81fff12280de [file] [log] [blame]
Chris Lattner4b009652007-07-25 00:24:17 +00001// Note that the run lines are at the bottom of this file.
2
3#define_target TEST1
4TEST1 // diagnose
5
6#define_target TEST2
7#undef TEST2
8TEST2 // no diagnose
9
10#define_target TEST3
11#define TEST3
12TEST3 // no diagnose
13
14#define TEST4
15#define_target TEST4
16TEST4 // 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'