xref: /llvm-project/clang/test/Sema/warn-shift-negative.c (revision 346048a1fa469dde8d1b3205c37ea40cc1377495)
1 // RUN: %clang_cc1 -fsyntax-only -Wshift-count-negative -fblocks -verify %s
2 
f(int a)3 int f(int a) {
4   const int i = -1;
5   return a << i; // expected-warning{{shift count is negative}}
6 }
7