[PATCH] D155356: [clang][Interp] Implement __builtin_nan family of functions
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 18 12:33:51 PDT 2023
tbaeder added inline comments.
================
Comment at: clang/test/AST/Interp/builtin-functions.cpp:44
+
+ constexpr float Nan2 = __builtin_nans([](){return "0xAE98";}()); // ref-error {{must be initialized by a constant expression}}
+}
----------------
aaron.ballman wrote:
> Probably worth a comment here mentioning that the ref-error is a rejects-valid issue that the experimental compiler accepts correctly.
I thought you said on Discord that the current interpreter is correct? I made the new one reject anything but string literals in https://reviews.llvm.org/D155545.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155356/new/
https://reviews.llvm.org/D155356
More information about the cfe-commits
mailing list