Debian Codegraph @

clang/test/DebugInfo/Generic/ubsan-trap-reason-crash.cpp

raw
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 and
4 // 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 %s
8
9 struct Foo {
10 void target() {}
11 } f;
12
13 void caller() {
14 f.target();
15 }
16
17
18 // CHECK-LABEL: @_Z6callerv
19 // CHECK: call void @llvm.ubsantrap(i8 22){{.*}}!nosanitize
20 // CHECK-NOT: __clang_trap_msg