You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is probably going to be tricky to solve. The problem is that we have two S[1] static array allocas for the implicit array literals, one for each branch, but the compiler generates temporaries for the Selements, and those have a custom dtor expression, so that they are only destructed if that branch was taken (i.e., the first S temporary gets a a && tmp1.~this() edtor, the 2nd one a a || tmp2.~this()).
What we do is emplace the element temporaries into the static array directly. The lvalues of the temporaries are thus GEPs into the static array allocas, not allocas directly (which would definitely dominate all uses). And those GEPs are created in the respective branches only, so don't dominate all uses in the cleanups (even though the dtor call would be disabled anyway if that branch wasn't taken).
The frontend lowers the ternary to
(a) ? foo([(S())][]) : foo([(S())][])
.The text was updated successfully, but these errors were encountered: