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

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 16 11:29:30 PST 2023


nridge added a comment.

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

> This will only make sure we have a distinction between `<<` and `>>` used as operators vs `<`/`>`

Note that `<<` and `>>` are not the only (or even the primary, in my mind) issue: there is an ambiguity between `<`/`>` as template argument list delimiters vs. comparison operators.

For example:

  template <bool>
  class a {};
  
  constexpr int b = 2;
  constexpr int c = 3;
  
  a<b>c> e;

Here, if the cursor is next to the `<`, a naive client-side angle-bracket matcher might highlight the first `>`, when the correct one to highlight would be the second one.


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