[clang-tools-extra] r314816 - [clang-tidy] fix buildbot hicpp-signed-bitwise

Jonas Toth via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 3 10:08:58 PDT 2017


Author: jonastoth
Date: Tue Oct  3 10:08:57 2017
New Revision: 314816

URL: http://llvm.org/viewvc/llvm-project?rev=314816&view=rev
Log:
[clang-tidy] fix buildbot hicpp-signed-bitwise

To finally fix the buildbot I added one single warning testcase.

Modified:
    clang-tools-extra/trunk/test/clang-tidy/hicpp-signed-bitwise-bug34747.cpp

Modified: clang-tools-extra/trunk/test/clang-tidy/hicpp-signed-bitwise-bug34747.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/hicpp-signed-bitwise-bug34747.cpp?rev=314816&r1=314815&r2=314816&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/hicpp-signed-bitwise-bug34747.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/hicpp-signed-bitwise-bug34747.cpp Tue Oct  3 10:08:57 2017
@@ -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
+}




More information about the cfe-commits mailing list