| Issue |
71867
|
| Summary |
[clang-tidy] `readability implicit bool conversion` applies wrong fix in ternary operator
|
| Labels |
|
| Assignees |
|
| Reporter |
felix642
|
When running `readability-implicit-bool-conversion` on this code we get an invalid fix.
```
int main()
{
bool bar = true ? 1 : false;
}
```
Suggested fix:
```
int main()
{
bool bar = true ? 1 : 0 != 0;
}
```
godbolt: https://godbolt.org/
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs