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

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 12:22:57 PDT 2020


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/Diagnostics.cpp:209
   // Update diag to point at include inside main file.
   D.File = SM.getFileEntryForID(SM.getMainFileID())->getName().str();
   D.Range = std::move(R);
----------------
can't we rather record the mainfilename once and make use of it here?
i believe the rest of the logic operates on the local sourcelocations/files associated with the sourcemanager inside the diagnostic in process.


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