clang/test/Analysis/int128-nocrash.c
raw| 1 | // RUN: %clang_analyze_cc1 -analyzer-checker=optin.portability.UnixAPI \ |
| 2 | // RUN: -triple x86_64-pc-linux-gnu -x c %s |
| 3 | |
| 4 | // Don't crash! |
| 5 | // expected-no-diagnostics |
| 6 | const __int128_t a = ( (__int128_t)1 << 64 ); |
| 7 | const _BitInt(72) b = ( 1 << 72 ); |
| 8 | |
| 9 | void int128() { |
| 10 | 2 >> a; |
| 11 | } |
| 12 | |
| 13 | void withbitint() { |
| 14 | 2 >> b; |
| 15 | } |