Unify CXXTemporaryObjectExpr and CXXConstructExpr code and zero-initialize the object if requested.
Hints on how to test this properly without creating some weird intermediate object are welcome of course. :)
Differential D154189
[clang][Interp] Implement zero-init of record types tbaeder on Jun 30 2023, 12:59 AM. Authored by
Details Unify CXXTemporaryObjectExpr and CXXConstructExpr code and zero-initialize the object if requested. Hints on how to test this properly without creating some weird intermediate object are welcome of course. :)
Diff Detail Event Timeline
|
I briefly talked about this with @aaron.ballman on IRC. The current interpreter properly zero-initialized all the fields of a struct, but the un-does the initialization again (and initializes them to a APValue::Indeterminate in HandleConstructorCall::SkipToField().