xref: /minix3/external/bsd/llvm/dist/clang/test/SemaCXX/array-bounds-system-header.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -isystem %S/Inputs -verify %s
2*f4a2713aSLionel Sambuc #include <array-bounds-system-header.h>
test_system_header_macro()3*f4a2713aSLionel Sambuc void test_system_header_macro() {
4*f4a2713aSLionel Sambuc   BAD_MACRO_1; // no-warning
5*f4a2713aSLionel Sambuc   char a[3]; // expected-note 2 {{declared here}}
6*f4a2713aSLionel Sambuc   BAD_MACRO_2(a, 3); // expected-warning {{array index 3}}
7*f4a2713aSLionel Sambuc   QUESTIONABLE_MACRO(a);
8*f4a2713aSLionel Sambuc   NOP(a[3] = 5); // expected-warning {{array index 3}}
9*f4a2713aSLionel Sambuc }
10