bolt/deps/llvm-18.1.8/clang/test/Sema/Inputs/diagnose-if-warn-system-header.h

12 lines
311 B
C
Raw Normal View History

2025-02-14 19:21:04 +01:00
#pragma GCC system_header
inline int system_header_func(int x)
__attribute__((diagnose_if(x == x, "system header warning", "warning"))) // expected-note {{from 'diagnose_if' attribute}}
{
return 0;
}
void test_system_header(void) {
system_header_func(0); // expected-warning {{system header warning}}
}