[clang] Clang: Support minimumnum and maximumnum intrinsics (PR #96281)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 13 22:18:54 PDT 2024


================
@@ -0,0 +1,55 @@
+// RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify %s
+// FIXME: %clang_cc1 -std=c++17 -fsyntax-only -verify -fexperimental-new-constant-interpreter %s
+// expected-no-diagnostics
+
+constexpr double NaN = __builtin_nan("");
+constexpr double Inf = __builtin_inf();
+constexpr double NegInf = -__builtin_inf();
----------------
arsenm wrote:

Maybe could test snan cases, not sure if there are special rules for them in constant expressions 

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


More information about the cfe-commits mailing list