@@ -72,7 +72,7 @@ func return_borrowed_fixed(_ t: borrowing Triangle) -> Triangle {
72
72
return copy t
73
73
}
74
74
75
- // FIXME: copy propagation isn't able to simplify this. No copy should be required.
75
+ // FIXME: copy propagation isn't able to simplify this. No copy should be required. (rdar://161359163)
76
76
@_manualOwnership
77
77
func return_consumingParam( _ t: consuming Triangle ) -> Triangle { // expected-error {{ownership of 't' is demanded and cannot not be consumed}}
78
78
return t
@@ -95,20 +95,20 @@ func reassign_with_lets() -> Triangle {
95
95
func renamed_return( _ cond: Bool , _ a: Triangle ) -> Triangle {
96
96
let b = a
97
97
let c = b
98
- // FIXME: we say 'c' instead of 'b', because of the propagation.
98
+ // FIXME: we say 'c' instead of 'b', because of the propagation. (rdar://161360537)
99
99
if cond { return b } // expected-error {{ownership of 'c' is demanded}}
100
100
return c // expected-error {{ownership of 'c' is demanded}}
101
101
}
102
102
103
103
@_manualOwnership
104
104
func renamed_return_fix1( _ cond: Bool , _ a: Triangle ) -> Triangle {
105
105
let b = copy a
106
- let c = copy b // FIXME: not needed! Is explicit_copy_value is blocking propagation?
106
+ let c = copy b // FIXME: not needed! Is explicit_copy_value is blocking propagation? (rdar://161359163)
107
107
if cond { return b }
108
108
return c
109
109
}
110
110
111
- // FIXME: this crashes CopyPropagation!
111
+ // FIXME: this crashes CopyPropagation! (rdar://161360764)
112
112
//@_manualOwnership
113
113
//func renamed_return_fix2(_ cond: Bool, _ a: Triangle) -> Triangle {
114
114
// let b = a
@@ -169,8 +169,8 @@ func check_vars_fixed(_ t: Triangle, _ b: Bool) -> Triangle {
169
169
return copy x
170
170
}
171
171
172
- // FIXME: var's still have some issues.
173
- // (1) MandatoryRedundantLoadElimination introduces a 'copy_value' in place of a 'load [copy]'
172
+ // FIXME: var's still have some issues
173
+ // (1) MandatoryRedundantLoadElimination introduces a 'copy_value' in place of a 'load [copy]' (rdar://161359163)
174
174
175
175
// @_manualOwnership
176
176
// func reassignments_0() -> Triangle {
@@ -234,7 +234,7 @@ public func basic_loop_nontrivial_values_fixed(_ t: Triangle, _ xs: [Triangle])
234
234
235
235
@_manualOwnership
236
236
public func basic_loop_nontrivial_values_reduced_copies( _ t: Triangle , _ xs: [ Triangle ] ) {
237
- // FIXME: confusing variable names are chosen
237
+ // FIXME: confusing variable names are chosen (rdar://161360537)
238
238
let nt = t. nontrivial // expected-error {{accessing 'nt' produces a copy of it}}
239
239
var p : Pair = nt. a
240
240
for x in copy xs {
@@ -379,7 +379,7 @@ func reassign_with_lets<T>(_ t: T) -> T {
379
379
return copy z
380
380
}
381
381
382
- // FIXME: there's copy propagation has no effect on address-only types.
382
+ // FIXME: copy propagation has no effect on address-only types, so this is quite verbose .
383
383
@_manualOwnership
384
384
func reassign_with_lets_fixed< T> ( _ t: T ) -> T {
385
385
let x = copy t
@@ -431,8 +431,7 @@ extension FixedWidthInteger {
431
431
432
432
@_manualOwnership
433
433
mutating func rotatedLeft( _ distance: Int ) {
434
- // FIXME: this doesn't appear to be solvable
435
- self = ( copy self) . leftRotate ( distance) // expected-error {{explicit 'copy' required here}}
434
+ self = ( copy self) . leftRotate ( distance)
436
435
}
437
436
}
438
437
0 commit comments