allwinner_a64/android/external/clang/test/Sema/warn-shift-negative.c
2018-08-08 16:14:42 +08:00

6 lines
178 B
C

// 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}}
}