| Issue |
164125
|
| Summary |
[clang-tidy] False positive readability-redundant-parentheses when macro is present
|
| Labels |
clang-tidy
|
| Assignees |
|
| Reporter |
chrchr-github
|
~~~c++
#include <algorithm>
#define min(x, y) x
int f(int a, int b) {
return (std::min)(a, b);
}
~~~
~~~
<source>:5:12: warning: redundant parentheses around _expression_ [readability-redundant-parentheses]
5 | return (std::min)(a, b);
| ^
~~~
The suggested fix causes a compilation error, besides possibly changing the semantics.
https://godbolt.org/z/eE74Ws3fd
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs