[PATCH] D67290: [clangd] Add a new highlighting kind for typedefs

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 9 07:19:57 PDT 2019


hokein accepted this revision.
hokein added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:530
+  case HighlightingKind::Typedef:
+    return "entity.name.type.typedef.cpp";
   case HighlightingKind::Namespace:
----------------
ilya-biryukov wrote:
> Not sure what the rules for the scope names are, happy to change if I'm doing it wrong
I think the current name is fine, just checked the name for this type in vscode highlighting configs, but didn't find a particular name for this type (my guess is that regex-based highlighting is not able to catch this case).


================
Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:501
 
         // These typedefs are not yet highlighted, their types are complicated.
+        using $Typedef[[Pointer]] = $TemplateParameter[[T]] *;
----------------
nit: the comment is out-of-date with this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67290





More information about the cfe-commits mailing list