Skip to content

[lldb] Fix the computation of the hidden/in_user_code flag #10066

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
merged 1 commit into from
Feb 20, 2025

Conversation

adrian-prantl
Copy link

in Swift expression evaluator diagnostics.

Before:

-> 11  	let f = Foo()
   12  	bar(f)
Target 0: (test) stopped.
(lldb) p init
             ^
             |error: initializers may only be declared within a type
             ╰─ error: expected '(' for initializer parameters
(lldb) b init

After:

-> 11  	let f = Foo()
   12  	bar(f)
Target 0: (test) stopped.
(lldb) p init
             ˄
             ╰─ error: expected '(' for initializer parameters
(lldb) b init

@adrian-prantl adrian-prantl requested a review from a team as a code owner February 20, 2025 00:17
@adrian-prantl
Copy link
Author

To be fair, in this particular case the other error would also be kind of helpful, but decide to not show any errors with source locations pointing into the expression wrapper.

@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl changed the title [lldb] Allow SwiftASTContext fallbacks for types from expressions [lldb] Fix the computation of the hidden/in_user_code flag Feb 20, 2025
in Swift expression evaluator diagnostics.

Before:

```
-> 11  	let f = Foo()
   12  	bar(f)
Target 0: (test) stopped.
(lldb) p init
             ^
             |error: initializers may only be declared within a type
             ╰─ error: expected '(' for initializer parameters
(lldb) b init
```

After:

```
-> 11  	let f = Foo()
   12  	bar(f)
Target 0: (test) stopped.
(lldb) p init
             ˄
             ╰─ error: expected '(' for initializer parameters
(lldb) b init
```
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit e13d412 into swiftlang:stable/20240723 Feb 20, 2025
3 checks passed
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