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

Limit macro use tokens to the macro use range #29

Open
pgoodman opened this issue Jan 31, 2022 · 0 comments
Open

Limit macro use tokens to the macro use range #29

pgoodman opened this issue Jan 31, 2022 · 0 comments

Comments

@pgoodman
Copy link
Member

If a macro is used in a conditional directive, e.g. #if __cplusplus >= 100, then we will mark the usage of the macro as __cplusplus >= 100 and not as __cplusplus. We can probably avoid this by making ParsedFileTracker::MacroExpands look for the end location of the macro use, then mark it somehow, e.g. in the token itself, or perhaps make ParsedFileTracker stateful, where the next time we want to inject a macro end, we already know loc we want to inject.

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

No branches or pull requests

1 participant