[PATCH] D59859: [clang-tidy] FIXIT for implicit bool conversion now obeys upper case suffixes if enforced.
    MyDeveloperDay via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Wed Mar 27 07:12:49 PDT 2019
    
    
  
MyDeveloperDay added a comment.
We normally add something to the documentation about the checker and/or the release notes to say what had changed
================
Comment at: clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp:48
   case CK_IntegralToBoolean:
-    return Type->isUnsignedIntegerType() ? "0u" : "0";
+    if (UppercaseSuffix) {
+      return Type->isUnsignedIntegerType() ? "0U" : "0";
----------------
LLVM normally doesn't put braces on small lines
================
Comment at: clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp:221
+        return BoolLiteral->getValue() ? "1.0F" : "0.0F";
+      } else {
+        return BoolLiteral->getValue() ? "1.0f" : "0.0f";
----------------
your don't really need the else here because you return above it
Repository:
  rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59859/new/
https://reviews.llvm.org/D59859
    
    
More information about the cfe-commits
mailing list