Add argument to parse headers via a source's flags#58
Open
Steelskin wants to merge 1 commit intocompnerd:mainfrom
Open
Add argument to parse headers via a source's flags#58Steelskin wants to merge 1 commit intocompnerd:mainfrom
Steelskin wants to merge 1 commit intocompnerd:mainfrom
Conversation
idt requires input to have an entry in the compilation database in order to be properly parsed. This is not always the case when parsing headers, depending on the project configuration. This change adds `--cdb-source=<path>`. When set, idt looks up `<path>` in the compilation database and adjusts the command line to parse the positional argument with the same flags as `<path>`, assuming that the positional argument is a header. Fixits are gated behind the `is_in_main_tu()` helper when `--cdb-source` is set to prevent spilling of fixits outside of the positional input. The helper is a no-op otherwise, preserving existing behavior.
36 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
idt requires input to have an entry in the compilation database in order to be properly parsed. This is not always the case when parsing headers, depending on the project configuration.
This change adds
--cdb-source=<path>. When set, idt looks up<path>in the compilation database and adjusts the command line to parse the positional argument with the same flags as<path>, assuming that the positional argument is a header.Fixits are gated behind the
is_in_main_tu()helper when--cdb-sourceis set to prevent spilling of fixits outside of the positional input. The helper is a no-op otherwise, preserving existing behavior.