21 lines · cpp
1// FIXME: We should emit a trap message for this case too.2// But sometimes Clang will emit a ubsan trap into the prologue of a function,3// at which point the debug-info locations haven't been set up yet and4// can't hook up our artificial inline frame. [Issue #150707]5 6// RUN: %clang_cc1 -triple arm64-apple-macosx14.0.0 -O0 -debug-info-kind=standalone -dwarf-version=5 \7// RUN: -fsanitize=null -fsanitize-trap=null -emit-llvm %s -o - | FileCheck %s8 9struct Foo {10 void target() {}11} f;12 13void caller() {14 f.target();15}16 17 18// CHECK-LABEL: @_Z6callerv19// CHECK: call void @llvm.ubsantrap(i8 22){{.*}}!nosanitize20// CHECK-NOT: __clang_trap_msg21