alexfh added a comment.

BTW, why is the check in the 'modernize' module? It doesn't seem to make 
anything more modern. I would guess, the pattern it detects is most likely to 
result from a programming error. Also, the fix, though it retains the behavior, 
has a high chance to be incorrect. Can you share the results of running this 
check on LLVM? At least, how many problems it found and how many times the 
suggested fix was correct.

I'd suggest to move the check to `misc` or maybe it's time to create a separate 
directory for checks targeting various bug-prone patterns.


================
Comment at: clang-tidy/modernize/BoolToIntegerConversionCheck.cpp:43
@@ +42,3 @@
+
+  if (!Location.isMacroID())
+    Diag << 0
----------------
nit: Since both positive and negative branches are present, I'd prefer to make 
the condition slightly simple by removing the negation.


http://reviews.llvm.org/D18821



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

Reply via email to