Douglas Gregor | f033f1d | 2010-07-20 20:18:03 +0000 | [diff] [blame^] | 1 | // Preamble detection test: see below for comments and test commands. |
| 2 | |
| 3 | #include <blah> |
| 4 | #ifndef FOO |
| 5 | #else |
| 6 | #ifdef BAR |
| 7 | #elif WIBBLE |
| 8 | #endif |
| 9 | #pragma unknown |
| 10 | #endif |
| 11 | |
| 12 | #ifdef WIBBLE |
| 13 | #include "honk" |
| 14 | #else |
| 15 | int foo(); |
| 16 | #endif |
| 17 | |
| 18 | // This test checks for detection of the preamble of a file, which |
| 19 | // includes all of the starting comments and #includes. Note that any |
| 20 | // changes to the preamble part of this file must be mirrored in |
| 21 | // Inputs/preamble.txt, since we diff against it. |
| 22 | |
| 23 | // RUN: %clang_cc1 -print-preamble %s > %t |
| 24 | // RUN: diff %t %S/Inputs/preamble.txt |
| 25 | |