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
[SR-13774] Utilize DefineDiagnosticMacros.h to shorten macro expansion arrays #56171
Comments
Comment by Hassan ElDesouky (JIRA) @xedin, owenvoorhees (JIRA User) I think this can be a nice starter bug. If so, do you think this is nicely written to help new contributors? |
Comment by Owen Voorhees (JIRA) Looks like a good starter bug to me!. For anyone working on this, you should be able to find all instances of the pattern by searching the codebase for imports of swift/AST/DiagnosticsAll.def. There may also be a few cases where only a subset of the diagnostic types (error/warning/note/remark) are defined, and in those cases we shouldn't make any changes. |
@swift-ci create |
Thank you, hassaneldesouky (JIRA User)! |
Comment by Mohammed Al-Dahleh (JIRA) I'm interested in trying this out. |
Comment by Saidhon Orifov (JIRA) Hey maldahleh (JIRA User), are you still working on this? I have changes ready for this story |
Comment by Mohammed Al-Dahleh (JIRA) Hey saidhon (JIRA User), I didn't do much on it yet, so feel free to assign it to yourself. |
Comment by Saidhon Orifov (JIRA) Thank you, maldahleh (JIRA User) |
Resolved by #34488 |
Additional Detail from JIRA
md5: 532d5c577999649781cbabde1b39b8a9
Issue Description:
There are a few arrays in the compiler's diagnostic engine that uses macro expansion to fill its content.
For example, the
diagnosticStrings[]
inDiagnosticEngine.cpp
... it's defined as the following:Based on DefineDiagnosticMacros.h we can shorten these lines to one line like the following:
The task is to shorten all of the similar arrays.
The text was updated successfully, but these errors were encountered: