-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[NFC][SourceManager] Rename line and column APIs for clarity #31943
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one, thank you! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@swift-ci Please smoke test |
@swift-ci Please smoke test |
@owenv lldb needs to be updated.
|
@swift-ci please smoke test |
swiftlang/llvm-project#1252 |
1 similar comment
swiftlang/llvm-project#1252 |
Windows bots don't support cross repo PR testing. @owenv feel free to merge this. |
@rintaro sounds good, thanks! I’m rerunning tests on the other PR now due to some CI flakiness. If those pass I may need some help merging this as I don’t have llvm-project commit access |
@owenv Unfortunately it's not flakiness, the Linux bot is currently failing for all |
@hamishknight oh, thanks for the heads up, I hadn’t noticed the issue was more widespread. In that case I’ll just pick this back up next week, it’s pretty non-urgent |
getLineAndColumn -> getPresumedLineAndColumnForLoc (respects #sourceLocation )
getLineNumber -> getLineAndColumnInBuffer (doesn't respect #sourceLocation )
This is a purely mechanical change (via Xcode refactoring) that applies some of the renaming suggested in https://forums.swift.org/t/filename-line-and-column-for-sourceloc/5463 by @rintaro . I've also been auditing calls to these methods to find incorrect uses, I'm going to split those into multiple PRs because they'd make this too hard to review.
Some of the other SourceManager API should probably be renamed too, but I think this s a good first step and will help address the most common cases of misuse.