[PATCH] D136017: [clang][Interp] Materializing primitive temporaries

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 17 11:04:54 PDT 2022


shafik added inline comments.


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:476
+
+  assert(E->getNumObjects() == 0 && "TODO: Implement cleanups");
+  return this->visit(SubExpr);
----------------
What cases do we have multiple objects? Can we add failing tests for those?


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:513
+
+      if (!this->emitSetLocal(PT_Sint32, *LocalIndex, E))
+        return false;
----------------
Should this use `*SubExprT` instead?


================
Comment at: clang/lib/AST/Interp/Interp.h:574
+/// 3) Initialized global with index \I with that
+template <PrimType Name, class T = typename PrimConv<Name>::T>
+bool InitGlobalTemp(InterpState &S, CodePtr OpPC, uint32_t I,
----------------
Is `Name` really a `TypeName`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136017/new/

https://reviews.llvm.org/D136017



More information about the cfe-commits mailing list