[PATCH] D23243: [clang-tidy] enhance modernize-use-bool-literals to check ternary operator

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 8 09:55:45 PDT 2016


alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.

LG with a nit.


================
Comment at: test/clang-tidy/modernize-use-bool-literals.cpp:124
@@ +123,3 @@
+  bool Result = Value == 1 ? 1 : 0;
+  // CHECK-MESSAGES: :[[@LINE-1]]:30: {{.*}}
+  // CHECK-MESSAGES: :[[@LINE-2]]:34: {{.*}}
----------------
The check lines should be a bit stricter. Please change to  `:[[@LINE-1]]:30: warning: converting integer literal to bool`. Other new patterns in this file as well.


https://reviews.llvm.org/D23243





More information about the cfe-commits mailing list