-
Notifications
You must be signed in to change notification settings - Fork 247
swift-format still can't treat unsafe
expressions correctly in some cases
#977
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
Comments
I've opened a PR with the fix here swiftlang/swift-syntax#3043! |
Synced to Apple’s issue tracker as rdar://148657851 |
I've confirmed that swift-format's format mode have been fixed thanks to swiftlang/swift-syntax#3043. However, its lint mode is still broken. Here is how to reproduce the issue. Input (test.swift)let ptr: UnsafePointer<UInt8>?
// comment
unsafe ptr = .init(bitPattern: 0)
print(ptr)
|
kkebo
added a commit
to kkebo/swift_os
that referenced
this issue
May 15, 2025
…fe assignment expressions Issue: swiftlang/swift-format#977
kkebo
added a commit
to kkebo/swift-format
that referenced
this issue
May 15, 2025
I've created a PR: #1021 |
kkebo
added a commit
to kkebo/swift-format
that referenced
this issue
May 15, 2025
kkebo
added a commit
to kkebo/swift_os
that referenced
this issue
May 17, 2025
…fe assignment expressions Issue: swiftlang/swift-format#977
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Thanks for fixing #972. However, it seems that swift-format still can't treat
unsafe
expressions correctly in some cases. The cases are when a l-value is unsafe.Input
Expected result
Actual result
Environment
The text was updated successfully, but these errors were encountered: