alexfh added inline comments.
================
Comment at: clang-tidy/modernize/BoolToIntegerConversionCheck.cpp:47
@@ +46,3 @@
+ const auto Type = Cast->getType().getLocalUnqualifiedType();
+ if (isPreprocessorIndependent(BoolLiteral, Result)) {
+ diag(BoolLiteral->getLocation(), "implicitly converting bool literal to "
----------------
I'd prefer an alternative with less code duplication:
auto Diag = diag("implicitly converting bool literal to %0%select{|inside a
macro}1; use ...") << Type;
if (<should add fixes>)
Diag << 1 << FixItHint::...;
else
Diag << 0;
http://reviews.llvm.org/D18821
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits