diff options
-rw-r--r-- | clang-tools-extra/test/clang-tidy/hicpp-signed-bitwise-bug34747.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/clang-tools-extra/test/clang-tidy/hicpp-signed-bitwise-bug34747.cpp b/clang-tools-extra/test/clang-tidy/hicpp-signed-bitwise-bug34747.cpp index 291ea8dc993..217df71dc33 100644 --- a/clang-tools-extra/test/clang-tidy/hicpp-signed-bitwise-bug34747.cpp +++ b/clang-tools-extra/test/clang-tidy/hicpp-signed-bitwise-bug34747.cpp @@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy %s hicpp-signed-bitwise %t -- | count 0 +// RUN: %check_clang_tidy %s hicpp-signed-bitwise %t -- // Note: this test expects no diagnostics, but FileCheck cannot handle that, // hence the use of | count 0. @@ -19,3 +19,11 @@ struct foo { void bar(OutputStream<signed char> &o) { foo<signed char> f(o); } + +void silence_lit() { + int SValue = 42; + int SResult; + + SResult = SValue & 1; + // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: use of a signed integer operand with a binary bitwise operator +} |