mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
3912bc237a
The verifier always emits fix-it positions with absolute line:col form in actual fix-its. Inserting them verbatim makes test sources fragile: any later edit that adds or removes lines above the diagnostic shifts the absolute number, even though the fix-it logically points to the same place. Default to rewriting absolute line numbers as sign-prefixed offsets relative to the diagnostic line, matching the form developers normally use. When the source-side fix-it run already contained an absolute line, preserve absolute form so the test stays in the style its author chose. Existing tests that previously emitted absolute lines are updated to the new relative form.