Skip to content

Conversation

@hnrklssn
Copy link
Member

@hnrklssn hnrklssn commented Nov 8, 2025

This adds support for remarks, and fixes 3 minor bugs related to existing expected- diagnostics in the source file being replaced or removed.

This is based on top of #85390, so only the last 4 commits actually belong to this PR.

`expected-expansion` can be a bit unergonomic to use, because it requires
pointing out not only the line, but also the column (which is not always
obvious), and the nested diagnostics have to refer to absolute lines
that aren't present in the source file. This makes both creating and
updating these test cases easier through automation.
This fixes a bug that was introduced where two diagnostics on the same
line, with the same content, would be emitted separately if they
occurred on separate columns. This despite the fact that neither of
these checks specify the column when emitted. The checks are now
properly merged again.
When replacing expected diagnostic content, we should consider
expected diagnostics targeting the same target, not targeting the line
the expected diagnostic is on.
This fixes a bug in the diagnostic stealing logic when multiple
diagnostics target the same line, which would trigger an assert.
@hnrklssn
Copy link
Member Author

hnrklssn commented Nov 8, 2025

@swift-ci please smoke test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant