Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / PCH / rdar8852495.c
blob9ad4402429800d99fc400e355c8011933b6b1d84
1 // Test this without pch.
2 // RUN: %clang_cc1 %s -include %s -verify -fsyntax-only -Wno-sign-compare -Wtautological-compare
4 // Test with pch.
5 // RUN: %clang_cc1 %s -emit-pch -o %t -Wsign-compare -Wtautological-compare
6 // RUN: %clang_cc1 %s -include-pch %t -verify -fsyntax-only -Wno-sign-compare -Wtautological-compare
8 // expected-no-diagnostics
10 // This tests that diagnostic mappings from PCH are propagated for #pragma
11 // diagnostics but not for command-line flags.
13 #ifndef HEADER
14 #define HEADER
16 #pragma clang diagnostic ignored "-Wtautological-compare"
18 #else
20 int f(void) {
21 int a;
22 int b = a==a;
23 unsigned x;
24 signed y;
25 return x == y;
28 #endif