[PATCH] D146788: [clang][Interp] Fix zero-initializing of floating types
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 24 07:11:39 PDT 2023
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM with a suggestion.
================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1076-1081
+ case PT_Float: {
+ const auto &Sem = Ctx.getASTContext().getFloatTypeSemantics(E->getType());
+
+ APFloat Val(Sem);
+ return this->emitConstFloat(Val, E);
+ }
----------------
Desperately needs reformatting, but can do this in a one-liner that's actually a bit more clear.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146788/new/
https://reviews.llvm.org/D146788
More information about the cfe-commits
mailing list