================ @@ -6781,7 +6781,7 @@ static bool HandleConstructorCall(const Expr *E, const LValue &This, // and make sure we've initialized every step along it. auto IndirectFieldChain = IFD->chain(); for (auto *C : IndirectFieldChain) { - FD = cast<FieldDecl>(C); + FD = cast<FieldDecl>(C)->getCanonicalDecl(); ---------------- dmpolukhin wrote:
> Instead of this change, this should just do > `!declaresSameEntity(Value->getUnionField(), FD)` instead of > `Value->getUnionField() != FD` a few lines below (outside of GitHub context). Done, it is basically the same getCanonicalDecl but better for explaining the intent. https://github.com/llvm/llvm-project/pull/143168 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits