Page MenuHomePhabricator

[clangd][wip] Get rid of the include-cleaner hacky macro-reference implementation
Needs ReviewPublic

Authored by hokein on Mar 14 2023, 12:45 AM.
This revision needs review, but there are no reviewers specified.



By extending and using the existing MainFileMacros structure.

  • record more information (InConditionalDirective) in MacroOccurrence
  • collect macro references inside macro body

When emiting include-cleaner diagnostics, we convert the result to the
RecordedPP structure just-in-time to interop with include-cleaner

Put all together into a patch (might need to split)
TODO: the newly-added test doesn't pass, because there are some other
issues in missing-include diagnostics.

Diff Detail