zwuis wrote:
> Even with the latest changes in this PR, we still fail to detect redundant
> parentheses in the below cases:
> - in a return statement around the expression, e.g. `return (1 + 2 + 3);`,
> redundant-parentheses check fails to flag this as redundant
> - initialization in declaration around the initialization expression e.g.
> `constexpr int e = (1 + 2 + 3);`
>
> Happy to have some feedback on these as well, if these are indeed genuine
> issues or not.
I believe this is a false negative. You can open a new issue.
Note a corner case:
```cpp
decltype(auto) f(int x) {
decltype(auto) y = (x);
// not equivalent to:
// = x;
return (x);
// not equivalent to:
// return x;
}
```
https://github.com/llvm/llvm-project/pull/192254
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits