annotate clang/test/CodeGenCXX/ubsan-check-debuglocs.cpp @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited \
anatofuz
parents:
diff changeset
2 // RUN: -fsanitize=null %s -o - | FileCheck %s
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 // Check that santizer check calls have a !dbg location.
anatofuz
parents:
diff changeset
5 // CHECK: define {{.*}}acquire{{.*}} !dbg
anatofuz
parents:
diff changeset
6 // CHECK-NOT: define
anatofuz
parents:
diff changeset
7 // CHECK: call void {{.*}}@__ubsan_handle_type_mismatch_v1
anatofuz
parents:
diff changeset
8 // CHECK-SAME: !dbg
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 struct SourceLocation {
anatofuz
parents:
diff changeset
11 SourceLocation acquire() {};
anatofuz
parents:
diff changeset
12 };
anatofuz
parents:
diff changeset
13 extern "C" void __ubsan_handle_type_mismatch_v1(SourceLocation *Loc);
anatofuz
parents:
diff changeset
14 static void handleTypeMismatchImpl(SourceLocation *Loc) { Loc->acquire(); }
anatofuz
parents:
diff changeset
15 void __ubsan_handle_type_mismatch_v1(SourceLocation *Loc) {
anatofuz
parents:
diff changeset
16 handleTypeMismatchImpl(Loc);
anatofuz
parents:
diff changeset
17 }