alexfh requested changes to this revision.
This revision now requires changes to proceed.

================
Comment at: clang-tidy/modernize/UseBoolLiteralsCheck.cpp:39
@@ +38,3 @@
+
+  return LiteralSource.size() >= 1 && isDigit(LiteralSource.front());
+}
----------------
Use `!x.empty()` instead of `x.size() >= 1`.

================
Comment at: clang-tidy/modernize/UseBoolLiteralsCheck.h:19
@@ +18,3 @@
+
+/// Finds integer literals, which are implicitly cast to bool.
+///
----------------
What about the ones explicitly cast to `bool`? Do we want to warn on them?

================
Comment at: test/clang-tidy/modernize-use-bool-literals.cpp:18
@@ +17,3 @@
+bool MacroIntToTrue = TRUE_MACRO; // Not ok, but can't replace
+// CHECK-MESSAGES: :[[@LINE-1]]:23: warning: implicitly converting integer 
literal to bool inside macro, use bool literal instead 
[modernize-use-bool-literals]
+
----------------
Please add CHECK-FIXES to ensure that both the definition of the macro and the 
code using it are not changed.


http://reviews.llvm.org/D18745



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to