Issue 97809
Summary [clang-tidy][request] Detect floating-point casts that cause loss of precision
Labels clang-tidy
Assignees
Reporter chrchr-github
    ~~~c++
double f(double a, double b, float c) {
    return a + (float)b + c;
}
~~~
The result of the cast is used as `double`, so it is unlikely to be intentional.
There should be no warning when the cast affects overload resolution though.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to