llvm-project/clang/test/Sema/warn-shift-negative.c

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 lines
178 B
C
Raw Normal View History

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