Skip to content
  • Ben Boeckel's avatar
    WIP: clang-tidy: resolve bool expression simpliciation lints · f6a9f041
    Ben Boeckel authored
    These conversions do not necessarily improve readability. They are
    converted in this commit so that the lint is free to find new instances.
    
    Conversion of functions of the form:
    
         bool check() {
              if (cond1) {
                   return false;
              }
              if (cond2) {
                   return false;
              }
              return true;
         }
    
    are not necessarily better as:
    
         bool check() {
              return !cond1 && !cond2;
         }
    
    since there may be other checks to add in the future or existing checks
    might have more context around them. This usually occurs in validation
    or dirty check functions.
    f6a9f041