[clang-tools-extra] [clang-tidy] Add check 'bugprone-assignment-in-selection-statement' (PR #180219)

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 8 00:47:36 PST 2026


=?utf-8?q?Balázs_Kéri?= <balazs.keri at ericsson.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/180219 at github.com>


https://github.com/zwuis commented:

Operands of `&&` and `||` are checked. It would be nice to check operand of `!` as well.

---

This check detects more cases than selection statements. How about renaming to "bugprone-assignment-in-condition"?

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


More information about the cfe-commits mailing list