Skip to content

Conversation

@artemcm
Copy link
Contributor

@artemcm artemcm commented Oct 30, 2025

Add public API on WarningControlRegionTree to query them: getEnabledDiagnosticGroups. This is intended to be used by clients (the compiler) to be able to query whether a given diagnostic group has been enabled in a given source file.

@artemcm
Copy link
Contributor Author

artemcm commented Oct 30, 2025

@swift-ci test

@artemcm
Copy link
Contributor Author

artemcm commented Oct 31, 2025

@swift-ci test Windows platform

@artemcm artemcm force-pushed the WarningControl-KeepTrackOfEnabled branch from e52ea22 to 45401fd Compare November 3, 2025 17:01
@artemcm
Copy link
Contributor Author

artemcm commented Nov 3, 2025

@swift-ci test

@artemcm
Copy link
Contributor Author

artemcm commented Nov 4, 2025

@swift-ci test Windows platform

@artemcm artemcm force-pushed the WarningControl-KeepTrackOfEnabled branch 2 times, most recently from 3039f19 to 86ac634 Compare November 7, 2025 17:30
@artemcm
Copy link
Contributor Author

artemcm commented Nov 7, 2025

@swift-ci test

@artemcm
Copy link
Contributor Author

artemcm commented Nov 7, 2025

@swift-ci test Windows platform

/// Produce a set of diagnostic group identifiers contained in
/// this tree which have a behavior specifier other than `ignored`.
@_spi(ExperimentalLanguageFeatures)
public func getEnabledDiagnosticGroups() -> Set<DiagnosticGroupIdentifier> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this just be a computed property? Or rather, why not expose enabledGroups as @_spi(…) public private(set)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that makes sense. Changed to be a @_spi(…) public private(set) property.

And add public API on `WarningControlRegionTree` to query them: `getEnabledDiagnosticGroups`.
This is intended to be used by clients (the compiler) to be able to query whether a given diagnostic group has been enabled in a given source file.
@artemcm artemcm force-pushed the WarningControl-KeepTrackOfEnabled branch from 86ac634 to bc8fd0a Compare November 7, 2025 22:03
@artemcm
Copy link
Contributor Author

artemcm commented Nov 7, 2025

@swift-ci test

1 similar comment
@artemcm
Copy link
Contributor Author

artemcm commented Nov 7, 2025

@swift-ci 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.

2 participants