[PATCH] D59757: [clangd] Send empty diagnostics when a file is closed

2019-03-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 192062. ilya-biryukov marked 2 inline comments as done. ilya-biryukov added a comment. - Added a comment that races are not possible Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59757/new/ https://review

[PATCH] D59757: [clangd] Send empty diagnostics when a file is closed

2019-03-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1000 std::lock_guard Lock(FixItsMutex); FixItsMap[File] = LocalFixIts; } hokein wrote: > ilya-biryukov wrote: > > hokein wrote: > > > IIUC, it seems that we

[PATCH] D59757: [clangd] Send empty diagnostics when a file is closed

2019-03-25 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE356880: [clangd] Send empty diagnostics when a file is closed (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D59757?vs=192062&id=192064#toc Repository: rC

[PATCH] D59757: [clangd] Send empty diagnostics when a file is closed

2019-03-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1000 std::lock_guard Lock(FixItsMutex); FixItsMap[File] = LocalFixIts; } ilya-biryu

[PATCH] D59757: [clangd] Send empty diagnostics when a file is closed

2019-03-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1000 std::lock_guard Lock(FixItsMutex); FixItsMap[File] = LocalFixIts; } hokein wrote: > IIUC, it seems that

[PATCH] D59757: [clangd] Send empty diagnostics when a file is closed

2019-03-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1000 std::lock_guard Lock(FixItsMutex); FixItsMap[File] = LocalFixIts; } IIUC, it seems that we might have race condition here, considering: - open a file which w

[PATCH] D59757: [clangd] Send empty diagnostics when a file is closed

2019-03-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: hokein. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric. Herald added a project: clang. The LSP clients cannot know clangd will not send diagnostic updates for closed files, so we send them an empty list of