jvikstrom accepted this revision.
jvikstrom added a comment.
This revision is now accepted and ready to land.

It feels a bit strange to be sending highlighting (even if they are empty)  
beyond eof. But I guess the proposal does not specify this and it would make 
life for the vscode extension (much) simpler.
Theia also does not crash from this and if we apply decorations to vscode 
outside the file nothing happens as well so I guess it should be fine. (even 
when vscode finally implements this feature into lsp)

Just had the comment about comparing HighlightigLine objects instead of using 
matchers but up to you.



================
Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:625
+              testing::UnorderedElementsAre(
+                  testing::AllOf(LineNumber(3), EmptyHighlightings()),
+                  testing::AllOf(LineNumber(4), EmptyHighlightings())));
----------------
Maybe create the HighlightingLine objects for Line 3 and 4 and add them 
directly in the `UnorderedElementsAre` because then we don't have to create the 
matchers.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66541/new/

https://reviews.llvm.org/D66541



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to