[PATCH] D85753: [clangd] Discard diagnostics from another SourceManager.

Adam Czachorowski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 17 04:26:20 PDT 2020


adamcz added inline comments.


================
Comment at: clang-tools-extra/clangd/Diagnostics.cpp:568
+  // If the diagnostic was generated for a different SourceManager, skip it.
+  // This can happen when using implicit modules.
+  if (OrigSrcMgr && Info.hasSourceManager() &&
----------------
sammccall wrote:
> sammccall wrote:
> > maybe a FIXME: errors from implicitly built modules should be surfaced somehow (but then must also be surfaced when the module was cached)
> Can we be a bit more specific: this happens when an #include causes a module to be implicitly built, using a separate SourceManager.
It's not just #include, could be "import". But yes, we can be more specific. Done.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85753



More information about the cfe-commits mailing list