[PATCH] D140668: [clang][Interp] Implement remaining bits for MaterializeTemporaryExprs
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 12 13:04:19 PST 2023
shafik added inline comments.
================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:761
if (std::optional<unsigned> LocalIndex =
allocateLocalPrimitive(SubExpr, *SubExprT, true, true)) {
if (!this->visitInitializer(SubExpr))
----------------
================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:788
+ assert(!classify(E->getType()));
+ // FIXME: Can we even get here with primitive types?
+ return this->visitInitializer(Init);
----------------
Maybe I am misreading the code but wouldn't `int x = (int){10};` do? godbolt: https://godbolt.org/z/5WYE5h8dW
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140668/new/
https://reviews.llvm.org/D140668
More information about the cfe-commits
mailing list