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
[+0-all-args] Ensure that we always return an enum at +1 from enum constructors.
This was exposed by a test in the SILGen filecheck tests that I am updating out
of tree.
What is basically happening here is that we construct an enum from a guaranteed
argument and then return that enum. We need to ensure in such a case that the
return value is still at +1. This commit fixes the issue by using an
ensurePlusOne, ensuring that in normal cases we do not emit an extra copy, but
in a world where we have +0 arguments, ensures we insert a copy before we
return.
rdar://34222540
0 commit comments