Issue 243399
Summary [clang-tidy] don't trigger `readability-simplify-boolean-expr` on partially ordered types
Labels clang-tidy
Assignees
Reporter tearfur
    Applying De Morgan's Theorem to expressions of partially ordered types is not always equivalent. For example, `!(0. >= d && d <=1.) != (0. < d && d > 1.)` when `d` is NaN.

https://godbolt.org/z/1crnTKhT4:

```
<source>:4:12: warning: boolean _expression_ can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr]
    4 |     return !(d >= 5. && d <= 7.);
      |            ^~~~~~~~~~~~~~~~~~~~~
      |                < ||   >
1 warning generated.
```

Current trunk: 79cdf28cddc5ceaf3a35ec941f6b420da8711783
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to