bolt/deps/llvm-18.1.8/clang/test/Sema/warn-shift-negative.c

7 lines
178 B
C
Raw Normal View History

2025-02-14 19:21:04 +01:00
// RUN: %clang_cc1 -fsyntax-only -Wshift-count-negative -fblocks -verify %s
int f(int a) {
const int i = -1;
return a << i; // expected-warning{{shift count is negative}}
}