Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenObjC / ubsan-array-bounds.m
blobebb7517adca98bd73d01f55b608a900f96137c53
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 {
4 @public
5   char chars[0];
7 @end
8 @implementation FlexibleArray1
9 @end
11 // CHECK-LABEL: test_FlexibleArray1
12 char test_FlexibleArray1(FlexibleArray1 *FA1) {
13   // CHECK-NOT: !nosanitize
14   return FA1->chars[1];
15   // CHECK: }