blob: 2b7cd3eed22602708411d8b1178b1e19e44a219a [file] [log] [blame]
// RUN: %clang_cc1 -fsanitize=null -emit-llvm %s -o - | FileCheck %s
struct A {
int a[2];
int b;
};
// CHECK-LABEL: @f1
int *f1() {
// CHECK-NOT: __ubsan_handle_type_mismatch
// CHECK: ret
// CHECK-SAME: getelementptr inbounds (%struct.A, %struct.A* null, i32 0, i32 1)
return &((struct A *)0)->b;
}