aaron.ballman added a comment.

In D135013#3871250 <https://reviews.llvm.org/D135013#3871250>, @tbaeder wrote:

> 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.

Ah, yes! That's true, they are inside the struct or array. I'm not certain you 
can have one *of* struct type in C++ because it's either going to be zeroed or 
left uninitialized (due to constructors).


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

https://reviews.llvm.org/D135013

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to