Skip to content

[ASTGen] ObjC improvements #80150

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 2 commits into from
Mar 21, 2025
Merged

[ASTGen] ObjC improvements #80150

merged 2 commits into from
Mar 21, 2025

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Mar 19, 2025

  • Generate #selector(...) expression
  • Generate #keyPath(...) expression
  • Implicit @objc attribute for @_objcImplementation attribute

@rintaro
Copy link
Member Author

rintaro commented Mar 19, 2025

@swift-ci Please smoke test

@rintaro
Copy link
Member Author

rintaro commented Mar 20, 2025

@swift-ci Please smoke test

@rintaro
Copy link
Member Author

rintaro commented Mar 20, 2025

@swift-ci Please smoke test macOS

* Generate `#selector(...)` expression
* Generate `#keyPath(...)` expression
* Implicit `@objc` attribute for `@_objcImplementation` attribute
@rintaro
Copy link
Member Author

rintaro commented Mar 20, 2025

@swift-ci Please smoke test

@@ -194,11 +194,98 @@ extension ASTGenVisitor {
)
}

func generateObjCSelectorExpr(freestandingMacroExpansion node: some FreestandingMacroExpansionSyntax) -> BridgedObjCSelectorExpr {
fatalError("unimplemented (objc selector)")
func generateObjCSelectorExpr(freestandingMacroExpansion node: some FreestandingMacroExpansionSyntax) -> BridgedExpr {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also need to diagnose the presence of trailing closure + generic arguments?

}

func generateObjCKeyPathExpr(freestandingMacroExpansion node: some FreestandingMacroExpansionSyntax) -> BridgedKeyPathExpr {
fatalError("unimplemented (objc keypath)")
func generateObjCKeyPathExpr(freestandingMacroExpansion node: some FreestandingMacroExpansionSyntax) -> BridgedExpr {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@rintaro
Copy link
Member Author

rintaro commented Mar 20, 2025

@swift-ci Please smoke test

@rintaro rintaro enabled auto-merge March 20, 2025 23:02
@rintaro
Copy link
Member Author

rintaro commented Mar 21, 2025

swiftlang/swift-testing#1033
@swift-ci Please smoke test

1 similar comment
@rintaro
Copy link
Member Author

rintaro commented Mar 21, 2025

swiftlang/swift-testing#1033
@swift-ci Please smoke test

@rintaro
Copy link
Member Author

rintaro commented Mar 21, 2025

@swift-ci Please smoke test

@rintaro rintaro merged commit 4c75d7b into swiftlang:main Mar 21, 2025
3 checks passed
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