brintos

brintos / llvm-project-archived public Read only

0
0
Text · 534 B · 7f1df56 Raw
13 lines · cpp
1// RUN: %clangxx -fsanitize=implicit-integer-sign-change %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 5#include <stdint.h>6 7int main() {8  int32_t t0 = (~(uint32_t(0)));9  // CHECK-NOTYPE: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior {{.*}}summary.cpp:[[@LINE-1]]:1610  // CHECK-TYPE: SUMMARY: UndefinedBehaviorSanitizer: implicit-integer-sign-change {{.*}}summary.cpp:[[@LINE-2]]:1611  return 0;12}13