[PATCH] D127856: [clangd] Support multiline semantic tokens

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 21 08:18:55 PDT 2022


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 rare case?
unfortunately copy is needed, as the delta needs to be from start of the last token :/

changing the logic to do the copy only in the rare case by using a scratch element, LMK if you have better ideas here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127856



More information about the cfe-commits mailing list