================
@@ -13044,9 +13044,12 @@ static QualType checkArithmeticOrEnumeralCompare(Sema 
&S, ExprResult &LHS,
   if (Type->isAnyComplexType() && BinaryOperator::isRelationalOp(Opc))
     return S.InvalidOperands(Loc, LHS, RHS);
 
-  // Check for comparisons of floating point operands using != and ==.
-  if (Type->hasFloatingRepresentation())
+  if (Type->hasFloatingRepresentation()) {
+    // Check for comparisons to NAN or INFINITY in fast math mode.
+    S.CheckInfNaNFloatComparison(Loc, LHS.get(), RHS.get(), Opc);
----------------
andykaylor wrote:

Should this be done in CheckFloatComparison()?

https://github.com/llvm/llvm-project/pull/76873
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to