[PATCH] D155165: [clang][Interp] Fully serialize Floatings to bytes
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 28 08:33:58 PDT 2023
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM aside from some small nits.
================
Comment at: clang/lib/AST/Interp/Source.h:63-64
/// Pointer into the code owned by a function.
+public:
const std::byte *Ptr;
};
----------------
Any chance we can use friendship here as well, rather than exposing the data member directly?
================
Comment at: clang/test/AST/Interp/floats.cpp:142-149
constexpr long double ld = 3.1425926539;
+
+ constexpr long double f() {
+ const long double L = __LDBL_MAX__;
+
+ return L;
+ };
----------------
Probably makes sense to add a `__float128` test as well given that it's also a pretty large float type: https://godbolt.org/z/n8roa96jc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155165/new/
https://reviews.llvm.org/D155165
More information about the cfe-commits
mailing list