[clang-tidy] Added a couple of tests for misc-static-assert.

llvm-svn: 234094
This commit is contained in:
Alexander Kornienko 2015-04-04 14:54:53 +00:00
parent a932bb93b0
commit 61753ae327
1 changed files with 9 additions and 0 deletions

View File

@ -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!");