llvm-for-llvmta/tools/clang/test/CodeGen/ubsan-trap-debugloc.c

11 lines
355 B
C
Raw Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 -emit-llvm -disable-llvm-passes -O -fsanitize=signed-integer-overflow -fsanitize-trap=signed-integer-overflow %s -o - -debug-info-kind=line-tables-only | FileCheck %s
void foo(volatile int a) {
// CHECK: call void @llvm.ubsantrap(i8 0){{.*}} !dbg [[LOC:![0-9]+]]
a = a + 1;
a = a + 1;
}
// CHECK: [[LOC]] = !DILocation(line: 0