[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 31 01:19:58 PDT 2019
ilya-biryukov added inline comments.
================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1125
+ Old = std::move(FileToHighlightings[File]);
+ FileToHighlightings[File] = Highlightings;
+ }
----------------
NIT: avoid copying (from `Highlightings` into the map) under a lock, make the copy outside the lock instead
================
Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:408
+}
+
} // namespace
----------------
Could you also add a separate test that checks diffs when the number of lines is getting smaller (i.e. taking `NLines` into account)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64475/new/
https://reviews.llvm.org/D64475
More information about the cfe-commits
mailing list