[PATCH] D134361: [clang][Interp] Fix copy constructors of structs with array members

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 28 05:42:37 PDT 2022


tbaeder marked an inline comment as done.
tbaeder added inline comments.


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:654-664
+      if (!this->emitDupPtr(SubExpr))
+        return false;
+
+      if (!this->visit(SubExpr))
+        return false;
+
+      if (!this->emitInitElem(*ElemT, I, Initializer))
----------------
aaron.ballman wrote:
> In all of these cases we're leaving `ArrayIndex` set to `I` instead of `None`, is that intentional? (Might be worth an RAII object to handle this sort of thing.)
Heh :) Good you notice this as well. Yes, that's something I was worried about. It's not intentional at all. I'll try adding a RAII object.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134361



More information about the cfe-commits mailing list