mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 18:36:05 +00:00

of the shift wasn't a constant integer expression, now it (hopefully) does. PR: 22059 llvm-svn: 233320
7 lines
178 B
C
7 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}}
|
|
}
|