[clang] [clang] Make __builtin_exp and __builtin_expf constexpr. (PR #199808)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 16 22:48:42 PDT 2026
================
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify -fexperimental-new-constant-interpreter %s
+// expected-no-diagnostics
+
+constexpr float InfFloat = __builtin_inff();
+constexpr float NegInfFloat = -__builtin_inff();
+
----------------
lntue wrote:
@hubert-reinterpretcast : I've updated the PR to use updated APFloat::exp and to include NaN and overflow cases. Any other tests that you would like to be added here?
https://github.com/llvm/llvm-project/pull/199808
More information about the cfe-commits
mailing list