Skip to content
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

Specify when directives are included #71

Open
k2d222 opened this issue Jan 24, 2025 · 0 comments
Open

Specify when directives are included #71

k2d222 opened this issue Jan 24, 2025 · 0 comments

Comments

@k2d222
Copy link
Contributor

k2d222 commented Jan 24, 2025

Directives are diagnostic, enable and requires. What should we do with them when they are spread accross files?

  • For the global diagnostic filters directive, we can probably apply the same principle as for const_asserts Specify when const_assert statements are included #66, i.e. include them when at least one declaration in the module is referenced from the root module (with static usage analysis)
  • For the enable directive, we discussed at some point the following compromise:
    • Enable directives must be included in all modules that use a given extension.
    • The root module must repeat all enable directives used in referenced modules (via static usage analysis).
  • For the requires directive, since they are optional (contrary to enable), I suggest that we don't require the root module to repeat them, but we include in the final output those written in referenced modules (via static usage analysis).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant