Home | History | Annotate | Download | only in CodeGen
      1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsanitize=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 -fno-sanitize-recover %s -emit-llvm -o - | FileCheck %s --check-prefix=ABORT
      3 
      4 
      5 // RECOVER: @test
      6 // ABORT: @test
      7 void test() {
      8   extern volatile unsigned x, y, z;
      9 
     10   // RECOVER: uadd.with.overflow.i32
     11   // RECOVER: ubsan_handle_add_overflow(
     12   // RECOVER-NOT: unreachable
     13   // ABORT: uadd.with.overflow.i32
     14   // ABORT: ubsan_handle_add_overflow_abort(
     15   // ABORT: unreachable
     16   x = y + z;
     17 }
     18