Skip to content

[AST] Remove AccessorDecl handling from getSourceRangeIncludingAttrs #80407

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
Apr 1, 2025

Conversation

hamishknight
Copy link
Contributor

@hamishknight hamishknight commented Mar 31, 2025

It doesn't seem like this is necessary anymore since we no longer clone OverrideAttrs when checking overrides (except when invalidating). Moreover, it's now actively wrong since accessors introduced by macro expansions may be in different buffers than their their storage, so checking isBeforeInBuffer will non-deterministically result in the wrong source range.

I'm hoping to add an assertion to isBeforeInBuffer (#80402), which caught this.

It doesn't seem like this is necessary anymore since we no longer
clone OverrideAttrs when checking overrides (except when
invalidating). Moreover, it's now actively wrong since accessors
introduced by macro expansions may be in different buffers than their
their storage, so checking `isBeforeInBuffer` will non-deterministically
result in the wrong source range.
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight
Copy link
Contributor Author

@swift-ci please test Windows

@hamishknight hamishknight enabled auto-merge April 1, 2025 10:40
@hamishknight hamishknight merged commit a5768a9 into swiftlang:main Apr 1, 2025
5 checks passed
@hamishknight hamishknight deleted the locced-out branch April 1, 2025 13:41
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.

2 participants