-
Notifications
You must be signed in to change notification settings - Fork 351
🍒[clang] Use File Location for debug info resolution. #11723
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
Conversation
To improve debuggability, the macro arguments should be resolved to their original location rather than macro expansion location. [PR in cation](https://github.com/user-attachments/assets/994fb89f-83be-4c21-a79c-f8e51d818f7b) fixes llvm#160667 (cherry picked from commit beadb9e)
|
@swift-ci test |
|
Going to wait until next week before merging (to give it some time to brew upstream) |
|
@swift-ci test macOS |
|
@Michael137 This broke some |
… is handled swiftlang#11723 change changed how debug info for macros were handled. ``` commit 651cb8a Author: SKill <skill@google.com> Date: Thu Oct 30 14:39:15 2025 +0100 [clang] Use File Location for debug info resolution. (llvm#163982) To improve debuggability, the macro arguments should be resolved to their original location rather than macro expansion location. ``` This broke a bunch of the BoundsSafety tests because they were testing the debug info used by some macros. In particular * The `opt-remarks` test use debug info and the location of the `<count>` in `__counted_by(<count>)` changed to point at the macro argument instead the beginning of the macro * The `trap-reasons` tests explicitly tested the debug location of access that happened through a macro. The debug location previously pointed at the beginning of the `ARRAY` macro and now it points at the `array` argument to the macro. rdar://163727761&163727775&163727819&163727893&163727903
|
Fix for the tests broken by this change: #11739 |
Oh weird that pre-merge CI didnt catch those. Any idea why? Thanks for fixing! |
|
@Michael137 I think you need to do “@ swift-ci test llvm” to run the Clang tests |
To improve debuggability, the macro arguments should be resolved to their original location rather than macro expansion location.
Macro.debug.webm
fixes llvm#160667
(cherry picked from commit beadb9e)
rdar://163707092