Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -DA=1 -DB=1 -E %s | grep 'int a = 927 == 927' && |
| 2 | // RUN: clang-cc -DA=0 -DB=1 -E %s | grep 'int a = 37 == 37' && |
| 3 | // RUN: clang-cc -DA=1 -DB=0 -E %s | grep 'int a = 37 == 37' && |
| 4 | // RUN: clang-cc -DA=0 -DB=0 -E %s | grep 'int a = 927 == 927' && |
| 5 | // RUN: clang-cc -E %s | grep 'int a = 927 == 927' |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 6 | #if A xor B |
| 7 | #define X 37 |
| 8 | #else |
| 9 | #define X 927 |
| 10 | #endif |
| 11 | |
| 12 | #if A ^ B |
| 13 | #define Y 37 |
| 14 | #else |
| 15 | #define Y 927 |
| 16 | #endif |
| 17 | |
| 18 | int a = X == Y; |