[clang-tools-extra] [clang-tidy][NFC] Enable 'readability-simplify-boolean-expr' check (PR #158706)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 2 14:54:58 PST 2025


vbvictor wrote:

Looking at it again, I think we can't enable this check for now in the codebase because of patterns described in https://github.com/llvm/llvm-project/issues/164896.

In our concrete example, we have:
```cpp
  if (isCommonPrefixWithoutSomeCharacters(
          Threshold, StringRef{S1PadE.begin(), BiggerLength},
          StringRef{S2PadE.begin(), BiggerLength}))
    return true;

  SmallString<32> S1PadB{Str1}, S2PadB{Str2};
  padStringAtBegin(S1PadB, BiggerLength);
  padStringAtBegin(S2PadB, BiggerLength);

  if (isCommonSuffixWithoutSomeCharacters(
          Threshold, StringRef{S1PadB.begin(), BiggerLength},
          StringRef{S2PadB.begin(), BiggerLength}))
    return true;

  return false;

```

To proceed further, we can make obvious improvements that don't look like https://github.com/llvm/llvm-project/issues/164896.

https://github.com/llvm/llvm-project/pull/158706


More information about the cfe-commits mailing list