[clang-tools-extra] [clang-tidy] Extend readability-redundant-parentheses to declarations (PR #196739)

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Sat May 9 19:49:57 PDT 2026


================
@@ -641,6 +641,9 @@ Changes in existing checks
   note to suggest materializing the temporary range when iterating over temporary
   range expressions or initializer lists, as reusing them directly could be unsafe.
 
+- Improved :doc:`readability-redundant-parentheses
+  <clang-tidy/checks/readability/redundant-parentheses>` check to diagnose
+  redundant parentheses in declarations such as int (x) and int (f(int(arg)))
----------------
zwuis wrote:

Use double backticks for code snippets.

```
``int (x)``
```

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


More information about the cfe-commits mailing list