
Conversion performed using the script at: https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34 These are only tests where no manual fixup was required.
11 lines
466 B
C
11 lines
466 B
C
// RUN: %clang_cc1 -x c -debug-info-kind=line-tables-only -emit-llvm -fsanitize=returns-nonnull-attribute -o - %s | FileCheck %s
|
|
// The UBSAN function call in the epilogue needs to have a debug location.
|
|
|
|
__attribute__((returns_nonnull)) void *allocate(void) {}
|
|
|
|
// CHECK: define {{.*}}nonnull ptr @allocate(){{.*}} !dbg
|
|
// CHECK: call void @__ubsan_handle_nonnull_return_v1_abort
|
|
// CHECK-SAME: !dbg ![[LOC:[0-9]+]]
|
|
// CHECK: ret ptr
|
|
// CHECK-SAME: !dbg ![[LOC]]
|