forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 341
Cherry pick inline diagnostics #9426
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
adrian-prantl
merged 9 commits into
swiftlang:stable/20240723
from
adrian-prantl:cherry-pick-inline-diags
Oct 16, 2024
Merged
Cherry pick inline diagnostics #9426
adrian-prantl
merged 9 commits into
swiftlang:stable/20240723
from
adrian-prantl:cherry-pick-inline-diags
Oct 16, 2024
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
This patch is a reworking of Pete Lawrence's (@PortalPete) proposal for better expression evaluator error messages: llvm#80938 Before: ``` $ lldb -o "expr a+b" (lldb) expr a+b error: <user expression 0>:1:1: use of undeclared identifier 'a' a+b ^ error: <user expression 0>:1:3: use of undeclared identifier 'b' a+b ^ ``` After: ``` (lldb) expr a+b ^ ^ │ ╰─ error: use of undeclared identifier 'b' ╰─ error: use of undeclared identifier 'a' ``` This eliminates the confusing `<user expression 0>:1:3` source location and avoids echoing the expression to the console again, which results in a cleaner presentation that makes it easier to grasp what's going on. You can't see it here, bug the word "error" is now also in color, if so desired. Depends on llvm#106442. (cherry picked from commit d33fa70)
…vm#110707) This is a cleanup that moves the API towards value semantics. (cherry picked from commit 8789c96)
and implement them for dwim-print (a.k.a. `p`) as an example. The next step will be to expose them as structured data in SBCommandReturnObject. (cherry picked from commit 089227f)
) In a later commit, I want to add a method to access diagnostics as actual structured data, which will make these function names rather confusing. (cherry picked from commit c275080)
) This allows IDEs to render LLDB expression diagnostics to their liking without relying on characterprecise ASCII art from LLDB. It is exposed as a versioned SBStructuredData object, since it is expected that this may need to be tweaked based on actual usage. (cherry picked from commit 9eddc8b)
@swift-ci test |
llvm#112451) …reverse order The second inner loop (only) was missing the check for offset > column. Also this patch sorts the diagnostics before printing them. (cherry picked from commit 889e6ad)
…anges (llvm#112466) depends on llvm#112451 (cherry picked from commit 8046f15)
d3585f0
to
e103979
Compare
@swift-ci test |
1d2e2d1
into
swiftlang:stable/20240723
2 of 3 checks passed
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.
and port them to the Swift plugin!