Skip to content

[Macros] Diagnose top-level expansion of undefined freestanding macro #65429

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 26, 2023

Conversation

rxwei
Copy link
Contributor

@rxwei rxwei commented Apr 26, 2023

The root problem is that ResolveMacroRequest was shortcuting after calling lookupMacros. When type-checking a freestanding macro, it shouldn't need to call lookupMacros at all, but should go straight to CSGen.

rdar://108280416

@rxwei rxwei requested a review from DougGregor April 26, 2023 01:46
@rxwei
Copy link
Contributor Author

rxwei commented Apr 26, 2023

@swift-ci please smoke test

The root problem is that `ResolveMacroRequest` was shortcuting after calling `lookupMacros`. When type-checking a freestanding macro, it shouldn't need to call `lookupMacros` at all, but should go straight to CSGen.

rdar://108280416
@rxwei
Copy link
Contributor Author

rxwei commented Apr 26, 2023

@swift-ci please smoke test

@rxwei rxwei merged commit 69445e6 into swiftlang:main Apr 26, 2023
rxwei added a commit to rxwei/swift that referenced this pull request Apr 26, 2023
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.

3 participants