xref: /llvm-project/clang/test/Sema/Inputs/diagnose-if-warn-system-header.h (revision 1c2558021c155878c305701e11e3714cb521f599)
1 #pragma GCC system_header
2 
system_header_func(int x)3 inline int system_header_func(int x)
4   __attribute__((diagnose_if(x == x, "system header warning", "warning"))) // expected-note {{from 'diagnose_if' attribute}}
5 {
6   return 0;
7 }
8 
test_system_header(void)9 void test_system_header(void) {
10   system_header_func(0); // expected-warning {{system header warning}}
11 }
12