Skip to content

Macro diagnostics fixes #62598

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 3 commits into from
Dec 15, 2022
Merged

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Dec 15, 2022

Clean up and fix the handling of source locations in diagnostics produced from macros, and test by adding a Fix-It to the AddBlocker macro that replaces the + with a -. For diagnostics that come from a macro, append message text saying which macro it came from.

"Relink" the folded syntax node back into the primary syntax node. When
we do this, we get consistent source locations that do not require any
adjustment.

Test this by adding a Fix-It to the silly AddBlocker macro, replacing
the `+` with a `-`.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

Huh...

C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\llvm-project\llvm\lib\IR\DebugLoc.cpp(79): error C2429: language feature 'init-statements in if/switch' requires compiler flag '/std:c++17'

@DougGregor DougGregor merged commit 68d4f24 into swiftlang:main Dec 15, 2022
@DougGregor DougGregor deleted the macro-diagnostics-fixes branch December 15, 2022 03:54
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.

1 participant