[clang] [Clang] Add constexpr eval for cmath builtins (PR #194327)

via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 27 03:41:00 PDT 2026


================
@@ -700,6 +707,348 @@ static inline Floating abs(InterpState &S, const Floating &In) {
   return Output;
 }
 
+static bool interp__builtin_ceil(InterpState &S, CodePtr OpPC,
+                                 const InterpFrame *Frame,
+                                 const CallExpr *Call) {
+  const Floating &Val = S.Stk.pop<Floating>();
+  Floating Result = S.allocFloat(Val.getSemantics());
+  APFloat F = Val.getAPFloat();
+  unsigned BuiltinOp = Call->getBuiltinCallee();
----------------
Serosh-commits wrote:

YUP! will do it Thanks

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


More information about the cfe-commits mailing list