[clang] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)
Zahira Ammarguellat via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 10 13:31:25 PST 2024
================
@@ -6771,6 +6771,9 @@ def warn_pointer_sub_null_ptr : Warning<
def warn_floatingpoint_eq : Warning<
"comparing floating point with == or != is unsafe">,
InGroup<DiagGroup<"float-equal">>, DefaultIgnore;
+def warn_fast_floatingpoint_eq : Warning<
+ "explicit comparison with %0 when the program is assumed to not use or produce %0">,
----------------
zahiraam wrote:
Not sure this makes sense. Since I am also adding this warning to things like a * INF/NaN or foo(INF).
https://github.com/llvm/llvm-project/pull/76873
More information about the cfe-commits
mailing list