[clang] [Clang] Add constexpr eval for cmath builtins (PR #194327)
via cfe-commits
cfe-commits at lists.llvm.org
Wed May 6 00:34:03 PDT 2026
================
@@ -406,55 +406,55 @@ def LogF16F128 : Builtin, F16F128MathTemplate {
def LrintF128 : Builtin {
let Spellings = ["__builtin_lrintf128"];
- let Attributes = [FunctionWithBuiltinPrefix, NoThrow, ConstIgnoringErrnoAndExceptions];
+ let Attributes = [FunctionWithBuiltinPrefix, NoThrow, ConstIgnoringErrnoAndExceptions, Constexpr];
let Prototype = "long int(__float128)";
}
def LroundF128 : Builtin {
let Spellings = ["__builtin_lroundf128"];
- let Attributes = [FunctionWithBuiltinPrefix, NoThrow, ConstIgnoringErrnoAndExceptions];
+ let Attributes = [FunctionWithBuiltinPrefix, NoThrow, ConstIgnoringErrnoAndExceptions, Constexpr];
let Prototype = "long int(__float128)";
}
-def NearbyintF128 : Builtin {
- let Spellings = ["__builtin_nearbyintf128"];
- let Attributes = [FunctionWithBuiltinPrefix, NoThrow, Const];
- let Prototype = "__float128(__float128)";
+def NearbyintF16F128 : Builtin, F16F128MathTemplate {
----------------
Serosh-commits wrote:
:\ done
https://github.com/llvm/llvm-project/pull/194327
More information about the cfe-commits
mailing list