Page MenuHomePhabricator

PR45879: Use LValue object to evaluate active union members
AbandonedPublic

Authored by sepavloff on Apr 28 2021, 12:49 AM.

Details

Reviewers
rsmith
Summary

The function HandleUnionActiveMemberChange determined union members that
become active by analyzing LHS expression. It works for assignment
operator but in the case of C++ assignment operator LHS is not easily
available. Actually RHS was used instead, wich resulted in crash
reported in PR45879.

This change uses LValue object to find union members.

Diff Detail

Event Timeline

sepavloff requested review of this revision.Apr 28 2021, 12:49 AM
sepavloff created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2021, 12:49 AM
rsmith requested changes to this revision.Apr 30 2021, 1:45 PM

This change is not correct. The language rules only apply to particular syntactic forms, so we need to check for those exact syntactic forms here.

This revision now requires changes to proceed.Apr 30 2021, 1:45 PM
sepavloff abandoned this revision.May 31 2021, 4:10 AM

Alternative implementation in in https://reviews.llvm.org/D103395.