1 // RUN: %clang_cc1 -fsyntax-only -verify -Wtautological-bitwise-compare %s
2 
3 void test(int x) {
4   bool b1 = (8 & x) == 3;
5   // expected-warning@-1 {{bitwise comparison always evaluates to false}}
6   bool b2 = x | 5;
7   // expected-warning@-1 {{bitwise or with non-zero value always evaluates to true}}
8   bool b3 = (x | 5);
9   // expected-warning@-1 {{bitwise or with non-zero value always evaluates to true}}
10   bool b4 = !!(x | 5);
11   // expected-warning@-1 {{bitwise or with non-zero value always evaluates to true}}
12 }
13