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

2020-08-21 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb4889353207a: [clangd] Discard diagnostics from another SourceManager. (authored by adamcz). Changed prior to commit: https://reviews.llvm.org/D85753?vs=285961&id=287000#toc Repository: rG LLVM Githu

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

2020-08-17 Thread Adam Czachorowski via Phabricator via cfe-commits
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() &&

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

2020-08-17 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 285961. adamcz marked 3 inline comments as done. adamcz added a comment. addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85753/new/ https://reviews.llvm.org/D85753 Files: clang-tools-e

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

2020-08-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Yeah I think this is the right approach for now, because the cached modules don't include diagnostics and ensuring that they're persisted and available is a larger project. ==

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

2020-08-12 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz 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); kadircet wrote: > adam

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

2020-08-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
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); adamcz wrote: > kadi

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

2020-08-12 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz 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); kadircet wrote: > can'

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

2020-08-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
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 reco

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

2020-08-11 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added a reviewer: sammccall. adamcz added a comment. Hey Sam. What's your opinion on this? The options we have are: 1. Drop the diagnostics, like this change is doing 2. Relocate the diagnostic to the beginning of the "real" main file, like we do with SourceManager-less diagnostics 3. Tr

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

2020-08-11 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 284811. adamcz added a comment. log dropped dianostic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85753/new/ https://reviews.llvm.org/D85753 Files: clang-tools-extra/clangd/Diagnostics.cpp clang-tools-ext

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

2020-08-11 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous. Herald added a project: clang. adamcz requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. This can happen when building implicit modules, as demonstrated in