aboutsummaryrefslogtreecommitdiffstats
path: root/test/Sema/Inputs/diagnose-if-warn-system-header.h
blob: 753c69d4b53289f08ee03dbd4e4878167c0e4462 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#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() {
  system_header_func(0); // expected-warning {{system header warning}}
}