-
Notifications
You must be signed in to change notification settings - Fork 10.5k
DiagnosticEngine: Fix escalation for wrapped diagnostics #78398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DiagnosticEngine: Fix escalation for wrapped diagnostics #78398
Conversation
@swift-ci please smoke test macOS |
cc @DmT021 |
cda25bd
to
9e70208
Compare
@swift-ci please smoke test macOS |
void setWarningAsErrorForDiagID(DiagID id, bool value) { | ||
/// Sets whether warnings belonging to the diagnostic group identified by | ||
/// `id` should be escalated to errors. | ||
void setWarningsAsErrorsForDiagGroupID(DiagGroupID id, bool value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It took me a moment to understand why it's a valid change for the case when we apply WarningAsErrorRule
with TargetAll
. But it seems it's ok as all the uncategorized warnings have the no_group
group which will be stored in this BitVector like the others.
I'd leave a comment about it though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Will add a test too.
9e70208
to
f06a058
Compare
@swift-ci please smoke test macOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thank you!
@swift-ci please smoke test |
…ostic group This group has not shipped yet and was added mainly to support test coverage for d56b7df. Now that we have unit tests for this, delete the group, pending discussion.
@swift-ci please smoke test Linux |
f06a058
to
c4793b6
Compare
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
Wrapped diagnostics were not escalated to errors because the check was based on the diagnostic ID, which is that of the wrapper diagnostic in this case. Switch to tracking whether escalation was enabled for a given group instead.