1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 // RUN: %clang_cc1 -fsyntax-only -fstrict-flex-arrays=2 -verify=warn %s
12 @interface Flexible0 {
18 @interface Flexible1 {
24 char readit(Flexible *p) { return p->flexible[2]; }
25 char readit0(Flexible0 *p) { return p->flexible[2]; }
26 char readit1(Flexible1 *p) { return p->flexible[2]; } // warn-warning {{array index 2 is past the end of the array (that has type 'char[1]')}}