1 // RUN: %clang_cc1 -x objective-c -emit-llvm -triple x86_64-apple-macosx10.10.0 -Wno-objc-root-class -fsanitize=array-bounds %s -o - | FileCheck %s
3 @interface FlexibleArray1 {
8 @implementation FlexibleArray1
11 // CHECK-LABEL: test_FlexibleArray1
12 char test_FlexibleArray1(FlexibleArray1 *FA1) {
13 // CHECK-NOT: !nosanitize
18 @interface FlexibleArray2 {
23 @implementation FlexibleArray2 {
29 // CHECK-LABEL: test_FlexibleArray2_1
30 char test_FlexibleArray2_1(FlexibleArray2 *FA2) {
36 // CHECK-LABEL: test_FlexibleArray2_2
37 char test_FlexibleArray2_2(FlexibleArray2 *FA2) {
38 // CHECK-NOT: !nosanitize
39 return FA2->chars2[1];
43 @interface FlexibleArray3 {
48 @implementation FlexibleArray3 {
54 // CHECK-LABEL: test_FlexibleArray3
55 char test_FlexibleArray3(FlexibleArray3 *FA3) {