[PATCH] D139926: [clangd] Add semantic token for angle brackets

Christian Kandeler via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 19 04:18:42 PST 2023


ckandeler added a comment.

In D139926#4064769 <https://reviews.llvm.org/D139926#4064769>, @kadircet wrote:

>> We can easily check the actual character at the given position in the client, so I could just merge the two highlighting kinds.
>
> Thanks! Note that it might not be as easy at the face of templates, eg:
>
>   #define LESS <
>   template LESS typename T > class A {};

At least this one doesn't seem to be an issue; added test case.



================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.h:54
   Operator,
+  AngleBracket,
 
----------------
kadircet wrote:
> actually let's name these as `Bracket` rather than `AngleBracket`, as we might want to increase the coverage further in the future (and a use case such as yours can still look at the textual tokens to match relevant brackets).
Yes, I was going to suggest this myself.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139926



More information about the cfe-commits mailing list