forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 340
[cas] Fix caching of diagnostics using getCustomDiagID #9905
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
Merged
akyrtzi
merged 3 commits into
swiftlang:swift/release/6.2
from
benlangmuir:cache-custom-diags-stable
Apr 23, 2025
Merged
[cas] Fix caching of diagnostics using getCustomDiagID #9905
akyrtzi
merged 3 commits into
swiftlang:swift/release/6.2
from
benlangmuir:cache-custom-diags-stable
Apr 23, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
benlangmuir
commented
Jan 28, 2025
- Explanation: Fixes caching of diagnostics when Clang custom diagnostics are emitted. Note: in the next branch this also fixed a crash, but that crash was not present in the stable branch to begin with.
- Scope: Affects caching builds that emit custom diagnostics; mainly this applies to static analyzer actions.
- Issue/Radar: rdar://137060392
- Original PR: [cas] Fix caching of diagnostics using getCustomDiagID #9299 for my change, [clang] Extend diagnose_if to accept more detailed warning information, take 2 llvm/llvm-project#119712 for the upstream prerequisite
- Risk: Low. Only affects builds that emit custom diagnostics.
- Testing: New and existing regression tests pass.
- Reviewer: @cachemeifyoucan and @akyrtzi
@swift-ci please test |
@swift-ci please test llvm |
…n, take 2 (llvm#119712) This is take two of llvm#70976. This iteration of the patch makes sure that custom diagnostics without any warning group don't get promoted by `-Werror` or `-Wfatal-errors`. This implements parts of the extension proposed in https://discourse.llvm.org/t/exposing-the-diagnostic-engine-to-c/73092/7. Specifically, this makes it possible to specify a diagnostic group in an optional third argument. (cherry picked from commit 0865ecc)
Custom diagnostics need to be serialized so that they can be registered with the diagnostic engine during replay. If any custom diagnostics are emitted, we capture all the known custom diagnostics. While this could theoretically be wasteful, in practice custom diagnostics are created only when they will be emitted. Note: this also fixes clang/test/CAS/analyze-action.c. (cherry picked from commit 61d414a) (cherry picked from commit ee2a43d)
032adbf
to
69aedb4
Compare
@swift-ci please test |
@swift-ci please test llvm |
akyrtzi
approved these changes
Apr 21, 2025
All three of these failures are unrelated:
|
@swift-ci please test macOS |
@swift-ci please test llvm |
@swift-ci please test llvm |
@swift-ci please test |
@swift-ci please test Windows |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.