Skip to content

Backport "Add ErrorMessageID to -Winfer-union warnings (#25073)" to 3.8.2#25261

Merged
WojciechMazur merged 1 commit intorelease-3.8.2from
release-3.8.2_backport-25249
Feb 14, 2026
Merged

Backport "Add ErrorMessageID to -Winfer-union warnings (#25073)" to 3.8.2#25261
WojciechMazur merged 1 commit intorelease-3.8.2from
release-3.8.2_backport-25249

Conversation

@WojciechMazur
Copy link
Copy Markdown
Contributor

Backports #25249 to the 3.8.2-RC3.

PR submitted by the release tooling.
[skip ci]

Fixes #25073

Warnings emitted by `-Winfer-union` previously did not have an
ErrorMessageID,
which meant they could not be configured using `-Wconf`.

This PR:
- Introduces `InferUnionWarningID`
- Adds structured `InferUnionWarning` message
- Updates existing warn tests to include the ID
- Adds a new warn test verifying the ID is printed
- Adds a neg test verifying `-Wconf:id=E225:error` turns the warning
into an error

All tests pass.
[Cherry-picked f9de300][modified]
@WojciechMazur
Copy link
Copy Markdown
Contributor Author

No regressions detected in the community build up to release-3.8.2_backport-25237.

Reference

@WojciechMazur WojciechMazur merged commit 127e807 into release-3.8.2 Feb 14, 2026
59 of 60 checks passed
@WojciechMazur WojciechMazur deleted the release-3.8.2_backport-25249 branch February 14, 2026 10:36
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