[clang-tools-extra] r234094 - [clang-tidy] Added a couple of tests for misc-static-assert.
Alexander Kornienko
alexfh at google.com
Sat Apr 4 07:54:54 PDT 2015
Author: alexfh
Date: Sat Apr 4 09:54:53 2015
New Revision: 234094
URL: http://llvm.org/viewvc/llvm-project?rev=234094&view=rev
Log:
[clang-tidy] Added a couple of tests for misc-static-assert.
Modified:
clang-tools-extra/trunk/test/clang-tidy/misc-static-assert.cpp
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-static-assert.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-static-assert.cpp?rev=234094&r1=234093&r2=234094&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-static-assert.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-static-assert.cpp Sat Apr 4 09:54:53 2015
@@ -82,6 +82,15 @@ int main() {
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: found assert() that could be
// CHECK-FIXES: {{^ }}static_assert(ZERO_MACRO , "Report me!");
+ assert(0);
+
+#define false false
+ assert(false);
+
+#define false 0
+ assert(false);
+#undef false
+
assert(10==5 && "Report me!");
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: found assert() that could be
// CHECK-FIXES: {{^ }}static_assert(10==5 , "Report me!");
More information about the cfe-commits
mailing list