brintos

brintos / llvm-project-archived public Read only

0
0
Text · 489 B · 0a96465 Raw
11 lines · c
1// RUN: %clang_cc1 -Wno-error=return-type -x c -debug-info-kind=line-tables-only -emit-llvm -fsanitize=returns-nonnull-attribute -o - %s | FileCheck %s2// The UBSAN function call in the epilogue needs to have a debug location.3 4__attribute__((returns_nonnull)) void *allocate(void) {}5 6// CHECK: define {{.*}}nonnull ptr @allocate(){{.*}} !dbg7// CHECK: call void @__ubsan_handle_nonnull_return_v1_abort8// CHECK-SAME:  !dbg ![[LOC:[0-9]+]]9// CHECK: ret ptr10// CHECK-SAME:  !dbg ![[LOC]]11