[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / unsigned-overflow-minimal.c
blob401f0322e12ec65b036fdd94c0d74b581a4a9c44
1 // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsanitize=unsigned-integer-overflow -fsanitize-minimal-runtime %s -emit-llvm -o - | FileCheck %s
3 unsigned long li, lj, lk;
5 // CHECK-LABEL: define{{.*}} void @testlongadd()
6 void testlongadd(void) {
7 // CHECK: call void @__ubsan_handle_add_overflow_minimal_abort()
8 li = lj + lk;
11 // CHECK-LABEL: define{{.*}} void @testlongsub()
12 void testlongsub(void) {
13 // CHECK: call void @__ubsan_handle_sub_overflow_minimal_abort()
14 li = lj - lk;
17 // CHECK-LABEL: define{{.*}} void @testlongmul()
18 void testlongmul(void) {
19 // CHECK: call void @__ubsan_handle_mul_overflow_minimal_abort()
20 li = lj * lk;