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