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
[diagnose-unreachable] Fix incorrect diagnostic on keypath creation
If the property referred to by the final component of a KeyPath is a
type that is considered uninhabited by the compiler (e.g. caseless enums),
we currently emit an unreachable code warning at the location of the KeyPath
expression. This warning is emitted by the NoReturnFolding pass of the SILOptimizer
when it checks the property getter function generated for the KeyPath. This
change fixes the issue by emitting keypath accessor functions with artificial
SILLocations so that the diagnostics pass will skip it as non-user-written code.
rdar://80415811
0 commit comments