Skip to content

Commit 258ed0e

Browse files
aslrxwei
andcommitted
Improve diagnostics
Co-authored-by: Richard Wei <[email protected]>
1 parent 202c47f commit 258ed0e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/swift/AST/DiagnosticsSIL.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ NOTE(autodiff_cannot_differentiate_through_multiple_results,none,
608608
NOTE(autodiff_cannot_differentiate_through_inout_arguments,none,
609609
"cannot differentiate through 'inout' arguments", ())
610610
NOTE(autodiff_cannot_differentiate_through_direct_yield,none,
611-
"cannot differentiate through a direct yield result", ())
611+
"cannot differentiate through a '_read' accessor", ())
612612
NOTE(autodiff_enums_unsupported,none,
613613
"differentiating enum values is not yet supported", ())
614614
NOTE(autodiff_stored_property_parent_not_differentiable,none,

test/AutoDiff/SILOptimizer/activity_analysis.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ struct HasCoroutineModifyAccessors: Differentiable {
594594
// expected-note @+1 {{when differentiating this function definition}}
595595
func testAccessorCoroutinesRead(_ x: HasCoroutineReadAccessors) -> Float {
596596
// We do not support differentiation of _read accessors
597-
// expected-note @+1 {{cannot differentiate through a direct yield result}}
597+
// expected-note @+1 {{cannot differentiate through a '_read' accessor}}
598598
return x.computed
599599
}
600600

test/AutoDiff/SILOptimizer/differentiation_diagnostics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ struct HasModifyAccessors: Differentiable {
826826
// expected-note @+2 {{when differentiating this function definition}}
827827
@differentiable(reverse)
828828
func testReadAccessorCoroutines(_ x: HasReadAccessors) -> Float {
829-
// expected-note @+1 {{cannot differentiate through a direct yield result}}
829+
// expected-note @+1 {{cannot differentiate through a '_read' accessor}}
830830
return x.computed
831831
}
832832

0 commit comments

Comments
 (0)