1*f4a2713aSLionel Sambuc // Test this without pch. 2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -include %s -verify -fsyntax-only -Wno-sign-compare -Wtautological-compare 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc // Test with pch. 5*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-pch -o %t -Wsign-compare -Wtautological-compare 6*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -include-pch %t -verify -fsyntax-only -Wno-sign-compare -Wtautological-compare 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc // expected-no-diagnostics 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc // This tests that diagnostic mappings from PCH are propagated for #pragma 11*f4a2713aSLionel Sambuc // diagnostics but not for command-line flags. 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc #ifndef HEADER 14*f4a2713aSLionel Sambuc #define HEADER 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc #pragma clang diagnostic ignored "-Wtautological-compare" 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc #else 19*f4a2713aSLionel Sambuc f()20*f4a2713aSLionel Sambucint f() { 21*f4a2713aSLionel Sambuc int a; 22*f4a2713aSLionel Sambuc int b = a==a; 23*f4a2713aSLionel Sambuc unsigned x; 24*f4a2713aSLionel Sambuc signed y; 25*f4a2713aSLionel Sambuc return x == y; 26*f4a2713aSLionel Sambuc } 27*f4a2713aSLionel Sambuc 28*f4a2713aSLionel Sambuc #endif 29