[PATCH] D135013: [clang][Interp] Array initialization via ImplicitValueInitExpr

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 20 07:23:47 PDT 2022


tbaeder added a comment.

In D135013#3871209 <https://reviews.llvm.org/D135013#3871209>, @aaron.ballman wrote:

> In D135013#3870894 <https://reviews.llvm.org/D135013#3870894>, @tbaeder wrote:
>
>> @aaron.ballman Do you maybe have a different reproducer or know more about the expected behavior of a `ImplicitValueInitExpr` for array and record types?
>
> So here's another reproducer with a record type: https://godbolt.org/z/EhT4oqT3s and here's one with an array type: https://godbolt.org/z/Pbncnq418
>
> My understanding of `ImplicitValueInitExpr` is that it's used to represent some of the "holes" in the middle of an array/record that need to implicit get some values.

They are //inside// a struct or array, but not of array or struct type, if I understand correctly. But I see what you're getting at, I guess this should basically go through `visitZeroInitializer()` (which is currently unused), which should be extended to handle structs and arrays.


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

https://reviews.llvm.org/D135013



More information about the cfe-commits mailing list