[clang-tools-extra] [clang-tidy] Add readability-constant-operand-order check (PR #167158)

via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 8 09:08:51 PST 2025


================
@@ -0,0 +1,32 @@
+.. title:: clang-tidy - readability-constant-operand-order
+
+readability-constant-operand-order
+==================================
+
+Warns when a constant appears on the non-preferred side of a supported binary
+operator and offers a fix-it to swap operands (and invert the operator for
----------------
EugeneZelenko wrote:

```suggestion
operator and offers a fix-it note to swap operands (and invert the operator for
```

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


More information about the cfe-commits mailing list