https://bugs.llvm.org/show_bug.cgi?id=41054
Bug ID: 41054
Summary: misc-incorrect-roundings does not catch incorrect
rounding within the Conditional Operator
Product: clang
Version: 6.0
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: dcough...@apple.com
Reporter: lennart.cor...@ericsson.com
CC: dcough...@apple.com, llvm-bugs@lists.llvm.org
I run the checker misc-incorrect-roundings on this piece of code:
return (int) (x < 0 ? x - 0.5 : x + 0.5);
In this case Clang tidy does not pick up on the “x + 0.5” as being an incorrect
rounding, which it is.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs