// RUN: %clang_cc1 -Wall -Wshift-sign-overflow -ffreestanding -fsyntax-only -verify %s #include #define WORD_BIT (sizeof(int) * CHAR_BIT) template void f() { (void)(N << 30); // expected-warning {{bits to represent, but 'int' only has}} (void)(30 << N); // expected-warning {{bits to represent, but 'int' only has}} } void test() { f<30>(); // expected-note {{instantiation}} }