MythreyaK wrote:

Apologies for the delay and thank you for the review! 

>  Wouldn't it make more sense to use a SmallVector<variant<ParmVarDecl, 
> FieldDecl>> and resolve them individually?

I thought of that initially, but I couldn't think of a construct where both 
`ParmVarDecl` and `FieldDecl` could initialize the same structure. My 
understanding was that if we resolve the parameter to a `ParmVarDecl`, then the 
underlying struct has a constructor which prevents the struct from being 
direct-initialized. 

I opted to returning the full `CXXRecordDecl` instead of the individual 
`FieldDecl`s as it made it easier to inspect the base classes (at the callsite) 
and drop those members. 

> Also, this looks like it would fail if we are also initializing base class 
> fields, e.g.

I believe that is covered in `CXX20AggregateParenInitNoCtorDerived`. Please let 
me know if that isn't the case! 



https://github.com/llvm/llvm-project/pull/176635
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to