1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsanitize=unsigned-integer-overflow -fsanitize-recover=unsigned-integer-overflow %s -emit-llvm -o - | FileCheck %s --check-prefix=RECOVER
2 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsanitize=unsigned-integer-overflow %s -emit-llvm -o - | FileCheck %s --check-prefix=ABORT
3 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsanitize=null,object-size,alignment -fsanitize-recover=object-size %s -emit-llvm -o - | FileCheck %s --check-prefix=PARTIAL
8 extern volatile unsigned x
, y
, z
;
10 // RECOVER: uadd.with.overflow.i32{{.*}}, !nosanitize
11 // RECOVER: ubsan_handle_add_overflow({{.*}}, !nosanitize
12 // RECOVER-NOT: unreachable
13 // ABORT: uadd.with.overflow.i32{{.*}}, !nosanitize
14 // ABORT: ubsan_handle_add_overflow_abort({{.*}}, !nosanitize
15 // ABORT: unreachable{{.*}}, !nosanitize
22 // PARTIAL: %[[SIZE:.*]] = call i64 @llvm.objectsize.i64.p0(ptr {{.*}}, i1 false, i1 false)
23 // PARTIAL-NEXT: %[[CHECK0:.*]] = icmp uge i64 %[[SIZE]], 4
25 // PARTIAL: br i1 %[[CHECK0]], {{.*}} !nosanitize
27 // PARTIAL: call void @__ubsan_handle_type_mismatch_v1(