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
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() &&
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
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.
==
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
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
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'
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
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
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
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
11 matches
Mail list logo