[PATCH] D38639: [clangd] #include statements support for Open definition

William Enright via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 16 13:51:30 PDT 2017


Nebiroth marked 21 inline comments as done.
Nebiroth added inline comments.


================
Comment at: clangd/ClangdUnit.cpp:103
 
+  void AfterExecute(CompilerInstance &CI) override {
+    const SourceManager &SM = CI.getSourceManager();
----------------
ilya-biryukov wrote:
> There's a much better public API to get all includes that were encountered by the `Preprocessor`: we need to override `PPCallbacks ::InclusionDirective`.
> 
> 
> `PrecompiledPreamble` does not currently expose this callbacks, but could you add to `PreambleCallbacks` in a separate commit?
> 
If I were to use InclusionDirective , how would that callback be called automatically? As far as I know, it wouldn't be called automatically for every file that gets indexed the same way AfterExecute would be.


https://reviews.llvm.org/D38639





More information about the cfe-commits mailing list