Skip to content

Conversation

@delcypher
Copy link

#11723 change changed how debug info for macros were handled.

commit 651cb8a88a6138767692047516e8a1f95f71383c
Author: SKill <skill@google.com>
Date:   Thu Oct 30 14:39:15 2025 +0100

    [clang] Use File Location for debug info resolution. (#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

… 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
@delcypher delcypher self-assigned this Nov 4, 2025
@delcypher delcypher added the clang:bounds-safety Issue relating to the experimental -fbounds-safety feature in Clang label Nov 4, 2025
@delcypher
Copy link
Author

@swift-ci test

@delcypher
Copy link
Author

@swift-ci test llvm

@delcypher
Copy link
Author

@swift-ci please test Windows platform

@kavon kavon merged commit b787ea4 into swiftlang:stable/21.x Nov 4, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:bounds-safety Issue relating to the experimental -fbounds-safety feature in Clang

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants