brintos

brintos / llvm-project-archived public Read only

0
0
Text · 581 B · 8726c14 Raw
14 lines · cpp
1// RUN: %clangxx -fsanitize=integer %s -o %t2// RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOTYPE3// RUN: %env_ubsan_opts=report_error_type=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TYPE4// REQUIRES: ubsan-asan5 6#include <stdint.h>7 8int main() {9  (void)(uint64_t(10000000000000000000ull) + uint64_t(9000000000000000000ull));10  // CHECK-NOTYPE: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior {{.*}}summary.cpp:[[@LINE-1]]:4411  // CHECK-TYPE: SUMMARY: UndefinedBehaviorSanitizer: unsigned-integer-overflow {{.*}}summary.cpp:[[@LINE-2]]:4412  return 0;13}14