1*89a1d03eSRichard // RUN: %check_clang_tidy %s hicpp-signed-bitwise %t -- 2*89a1d03eSRichard 3*89a1d03eSRichard // Note: this test expects no diagnostics, but FileCheck cannot handle that, 4*89a1d03eSRichard // hence the use of | count 0. 5*89a1d03eSRichard 6*89a1d03eSRichard template <typename C> 7*89a1d03eSRichard struct OutputStream { 8*89a1d03eSRichard OutputStream &operator<<(C); 9*89a1d03eSRichard }; 10*89a1d03eSRichard 11*89a1d03eSRichard template <typename C> 12*89a1d03eSRichard struct foo { 13*89a1d03eSRichard typedef OutputStream<C> stream_type; foofoo14*89a1d03eSRichard foo(stream_type &o) { 15*89a1d03eSRichard o << 'x'; // warning occurred here, fixed now 16*89a1d03eSRichard } 17*89a1d03eSRichard }; 18*89a1d03eSRichard bar(OutputStream<signed char> & o)19*89a1d03eSRichardvoid bar(OutputStream<signed char> &o) { 20*89a1d03eSRichard foo<signed char> f(o); 21*89a1d03eSRichard } 22*89a1d03eSRichard silence_lit()23*89a1d03eSRichardvoid silence_lit() { 24*89a1d03eSRichard int SValue = 42; 25*89a1d03eSRichard int SResult; 26*89a1d03eSRichard 27*89a1d03eSRichard SResult = SValue & 1; 28*89a1d03eSRichard // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: use of a signed integer operand with a binary bitwise operator 29*89a1d03eSRichard } 30