[clang-tools-extra] [clang-tidy] Fix readability-simplify-boolean-expr for init statements (PR #172220)

via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 15 04:08:49 PST 2025


================

----------------
zeyi2 wrote:

Can we add more test cases?

Example:

```cpp
void test_init_stmt_true() {
  if (int i = 0; true) {
    // CHECK-FIXES: { int i = 0; foo(i); }
    foo(i);
  }
}
```

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


More information about the cfe-commits mailing list