riccibruno added a comment. Just to make sure I understand the issue correctly (and so please correct me if I am wrong):
The union member `e` leads to an `IndirectFieldDecl` in the record for `UnionExisting`. Then `CXXCtorInitializer::getMember` returns null since the initialized member is not a `FieldDecl`, but an `IndirectFieldDecl`. Using `CXXCtorInitializer::getAnyMember` handles both `FieldDecl`s and `IndirectFieldDecl`s, which solves the issue. Looks OK but probably better to wait for someone else to give the OK ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57665/new/ https://reviews.llvm.org/D57665 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits