- Notifications
You must be signed in to change notification settings - Fork14.5k
[clang][Modules] Reporting Errors for Duplicating Link Declarations inmodulemap
s#148959
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
A different approach we can take is to deduplicate link libraries per module silently, and avoid adding any error checks. I think that is probably fine since there are no correctness issues. But I think it is also beneficial to report to the user that their modulemap contains duplicating link declarations.@Bigcheese@jansvoboda11 what do you think? |
I think a hard error is a bit too much initially, maybe let's introduce a warning first and then tighten the screws later? |
…an error whe link declarations are used in submodules.
…ure as indicated by the test case clang/test/Modules/autolink.m
…s a feature as indicated by the test case clang/test/Modules/autolink.m"This reverts commit3286622.
Uh oh!
There was an error while loading.Please reload this page.
This PR teaches the modulemap parsing logic to report errors if the parsing logic sees duplicating link declarations in the same module. Specifically, duplicating link declarations means multiple link declarations with the same string-literal in the same module. No errors are reported if a same link declaration exist in a submodule and its enclosing module.
rdar://155880064