[PATCH] D127403: [clangd] Implement semantic token modifier "definition"

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 10 10:20:36 PDT 2022


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

Just realized ParmVarDecls (and template args) are maybe more complicated than I thought: I suppose they're only really definitions if the function/template has a body (i.e. is itself a definition).
Anyway don't worry about that, let's get this landed and maybe refine later.



================
Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:846
+        void $Function_decl[[Foo]](int $Parameter_def[[x]]);
         template <typename $TemplateParameter_decl[[T]]>
+        void $Function_def[[Bar]]($TemplateParameter[[T]] $Parameter_def[[x]]) {
----------------
nit: T should be a def here too.
it's not critical so if this case is hard at all feel free to leave it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127403



More information about the cfe-commits mailing list