This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG333620d37a26: [clangd] Support multiline semantic tokens
(authored by kadircet).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:947
+Out->tokenModifiers = Tok.Modifiers;
+Last = Tok;
sammccall wrote:
> this copy feels gratuitous, can we just use Tokens.back(), or do the copy in
> the r
kadircet updated this revision to Diff 438711.
kadircet marked 4 inline comments as done.
kadircet added a comment.
Get rid of the copy in common case
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127856/new/
https://reviews.llvm.org/D127856
Files
sammccall accepted this revision.
sammccall added inline comments.
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:947
+Out->tokenModifiers = Tok.Modifiers;
+Last = Tok;
this copy feels gratuitous, can we just use Tokens.back(), or do the
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:948
+} else {
+ // If a tokens length is past the end of the line, it should be treated
as
+ // if the token ends at the end of the line and will not wrap onto the
---
kadircet updated this revision to Diff 438387.
kadircet added a comment.
Split highlights into multiple tokens rather than trimming
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127856/new/
https://reviews.llvm.org/D127856
Files:
clang-tools-ext
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
(My first reaction was that this belongs in semanticHighlights() rather than
toSemanticTokens, but I think you got it right - the single-line restriction is
pretty unnatural from clang's
kadircet created this revision.
kadircet added reviewers: sammccall, nridge.
Herald added subscribers: usaxena95, arphaman.
Herald added a project: All.
kadircet requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-ext