brintos

brintos / llvm-project-archived public Read only

0
0
Text · 616 B · 81db5c4 Raw
18 lines · cpp
1// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited \2// RUN:   -fsanitize=null %s -o - | FileCheck %s3 4// Check that santizer check calls have a !dbg location.5// CHECK: define {{.*}}acquire{{.*}} !dbg6// CHECK-NOT: define7// CHECK: call void {{.*}}@__ubsan_handle_type_mismatch_v18// CHECK-SAME: !dbg9 10struct SourceLocation {11  SourceLocation acquire() { return {}; };12};13extern "C" void __ubsan_handle_type_mismatch_v1(SourceLocation *Loc);14static void handleTypeMismatchImpl(SourceLocation *Loc) { Loc->acquire(); }15void __ubsan_handle_type_mismatch_v1(SourceLocation *Loc) {16  handleTypeMismatchImpl(Loc);17}18