Argyrios Kyrtzidis | f41d3be | 2010-11-05 22:10:18 +0000 | [diff] [blame] | 1 | // Test this without pch. |
| 2 | // RUN: %clang_cc1 %s -include %s -verify -fsyntax-only |
| 3 | |
| 4 | // Test with pch. |
| 5 | // RUN: %clang_cc1 %s -emit-pch -o %t |
| 6 | // RUN: %clang_cc1 %s -include-pch %t -verify -fsyntax-only |
| 7 | |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 8 | // expected-no-diagnostics |
| 9 | |
Argyrios Kyrtzidis | f41d3be | 2010-11-05 22:10:18 +0000 | [diff] [blame] | 10 | #ifndef HEADER |
| 11 | #define HEADER |
| 12 | |
| 13 | #pragma clang diagnostic ignored "-Wtautological-compare" |
| 14 | |
| 15 | #else |
| 16 | |
| 17 | void f() { |
Chandler Carruth | a7689ef | 2011-03-27 09:46:56 +0000 | [diff] [blame] | 18 | int a = 0; |
| 19 | int b = a==a; |
Argyrios Kyrtzidis | f41d3be | 2010-11-05 22:10:18 +0000 | [diff] [blame] | 20 | } |
| 21 | |
| 22 | #endif |