1 // RUN: %clang -fsanitize=implicit-unsigned-integer-truncation %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK
6 // CHECK-NOT: implicit-conversion
8 // Negative tests. Even if they produce unexpected results, this sanitizer does not care.
9 int8_t n0
= (~((uint32_t)(0))); // ~0 -> -1, but do not warn.
13 _Bool b0
= (~((uint32_t)(0)));
16 // Explicit and-ing of bits will silence it.
17 uint8_t nc0
= ((~((uint32_t)(0))) & 255);
20 uint8_t t0
= (~((uint32_t)(0)));
21 // CHECK: implicit-conversion by 0x{{[[:xdigit:]]+$}}
22 // CHECK-NOT: implicit-conversion