[clang-tools-extra] [clang-tidy][readability-redundant-parentheses] add option to prevent widely used work around (PR #164827)

via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 27 20:09:52 PDT 2025


================
@@ -27,3 +27,17 @@ affect the semantics.
 .. code-block:: c++
 
   int a = (1 * 2) + 3; // no warning
+
+Options
+-------
+
+.. option:: AllowedDecls
+
+  Semicolon-separated list of regular expressions matching names of declarations
+  to ignore when the parentheses are around. Declarations can include variables
+  or functions.
+  The default is an `std::max;std::min`.
----------------
EugeneZelenko wrote:

```suggestion
  or functions. The default is an `std::max;std::min`.
```

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


More information about the cfe-commits mailing list