[clang] [CLANG] Add warning when comparing to INF or NAN in fast math mode. (PR #76873)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 4 10:42:30 PST 2024


================
@@ -2267,6 +2273,16 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
   case Builtin::BI__builtin_signbit:
   case Builtin::BI__builtin_signbitf:
   case Builtin::BI__builtin_signbitl:
+    FPO = TheCall->getFPFeaturesInEffect(getLangOpts());
----------------
andykaylor wrote:

Should these checks be in SemaBuiltinFPClassification()?

https://github.com/llvm/llvm-project/pull/76873


More information about the cfe-commits mailing list