1// RUN: %clang -fsanitize=implicit-integer-sign-change %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK
2
3#include <stdint.h>
4
5int main() {
6// CHECK-NOT: implicit-conversion
7
8 // Explicitly casting hides it,
9 int32_t n0 = (int32_t)(~((uint32_t)0));
10
11 // Positive tests.
12 int32_t t0 = (~((uint32_t)0));
13// CHECK: implicit-conversion by 0x{{[[:xdigit:]]+$}}
14// CHECK-NOT: implicit-conversion
15
16 return 0;
17}
18

source code of compiler-rt/test/ubsan_minimal/TestCases/implicit-integer-sign-change.c