[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 19 06:40:00 PDT 2019
ilya-biryukov added inline comments.
================
Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:307
+ llvm::StringRef NewCode;
+ std::vector<int> DiffedLines;
+ } TestCases[]{
----------------
@hokein rightfully pointed out that mentioning all changed lines makes the tests unreadable.
An alternative idea we all came up with is to force people to put `^` on each of the changed lines inside the `NewCode`, i.e.
```
{/*Before*/ R"(
$Var[[a]]
$Func[[b]]
"),
/*After*/ R"(
$Var[[a]]
^$Func[[b]]
)"} // and no list of lines is needed!
```
Could we do that here?
One interesting case that we can't test this way to removing lines from the end of the file. But for that particular case, could we just write a separate test case?
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