[PATCH] D136594: [clangd] Add support for semantic token type "operator"

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 12 04:18:48 PST 2022


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

Thanks for the explanation! It makes sense. And given this motivation I don't think inverting to "builtin" is a good idea.
The impact is a bit limited because it's not a standard modifier, but it doesn't add much complexity, so LGTM.

I think the naming is an issue: "user-provided" is an unusual term with a very specific and unusual meaning for functions. I'd prefer the more generic "user-defined", if you don't mind changing it. (Also not perfect, but I can't think of a really good name).

Something related that might be interesting (and visible in more editors): highlighting the **non-**operator uses of `*` or other tokens. (This patch largely won't affect them, as they'll probably be client-side highlighted as operators if we don't say anything). Filed https://github.com/clangd/clangd/issues/1421. (Unfortunately I'm not really able to do clangd feature work these days)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136594



More information about the cfe-commits mailing list