[PATCH] D114072: [clangd] Record IWYU pragma keep in the IncludeStructure

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 30 02:38:00 PST 2021


kbobyrev added inline comments.


================
Comment at: clang-tools-extra/clangd/Headers.h:130
+  // IWYU pragmas but it needs to be explicitly added to as a preprocessor
+  // comment handler. PP wants to own the PPCallbacks, so the typical way to
+  // do both is:
----------------
sammccall wrote:
> Alternatively we could just give up on having a pure-ish API and say `void collect(Preprocessor&)`.
> Again there's not really any other sensible way to use it.
`PrecompiledPreamble.cpp` requires PPCallbacks being returned directly, so I think we can't easily have `void IncludeStructure::collect(PP &).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114072/new/

https://reviews.llvm.org/D114072



More information about the cfe-commits mailing list