Skip to content

Conversation

@kubamracek
Copy link
Contributor

Adding implementation for a case that SE-0492 says should be supported: Referencing non-global static functions from a @section initializer expression.

@kubamracek
Copy link
Contributor Author

@swift-ci please test

}

// Other closure expressions are not allowed
if (isa<AbstractClosureExpr>(expr))
Copy link
Member

Choose a reason for hiding this comment

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

It seems like @convention(c) closures should be okay here?

// - type_expr type="MyStruct.Type"
if (const AutoClosureExpr *autoClosureExpr =
dyn_cast<AutoClosureExpr>(expr)) {
if (auto callExpr =
Copy link
Member

Choose a reason for hiding this comment

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

I think AutoClosureExpr::getUnwrappedCurryThunkExpr() can help do a bunch of this digging for you.

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