[PATCH] D134523: [clang][Interp] Fix copy constructors with record array members

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 26 06:32:16 PDT 2022


erichkeane added inline comments.


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:332
+  // ArrayIndex might not be set if a ArrayInitIndexExpr is being evaluated
+  // stand-alone, e.g. via EvaluateAsInt().
+  if (!ArrayIndex)
----------------
For my edification: what reproducer causes us to do this?


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:665
+        // Narrow to our array element and recurse into visitInitializer()
+        if (!this->emitConstSint32(I, SubExpr))
+          return false;
----------------
So why are these signed-int32?  Indexes are 64 bit on 64 bit machines, right?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134523



More information about the cfe-commits mailing list