[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

Hubert Tong via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 29 08:28:39 PDT 2024


================
@@ -14638,6 +14649,8 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) {
     return true;
   }
 
+  case Builtin::BIfmin:
+  case Builtin::BIfminf:
----------------
hubert-reinterpretcast wrote:

I think we'll be missing at least "pedantic" diagnostics if we don't restrict the `constexpr`-ness to C++23 and up. So we do need that restriction.

The interaction with `-fno-builtin[-*]` may need more discussion. At least the documentation for that option would need to be updated if the C++23 `constexpr` math would break with it.

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


More information about the cfe-commits mailing list