[PATCH] D139926: [clangd] Add semantic token for angle brackets
Nathan Ridge via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 30 00:33:29 PST 2023
nridge added a comment.
In D139926#4084846 <https://reviews.llvm.org/D139926#4084846>, @nridge wrote:
> template <class T>
> class A {
> template <class U> void foo(U a) { }
> template<> void foo(int a) { } // <--
> };
>
> This one is `ClassScopeFunctionSpecializationDecl::getTemplateArgsAsWritten()`
I got this testcase slightly wrong, the `template<>` is handled via `VisitDeclaratorDecl`, but it can have arguments as well:
template <class T>
class A {
template <class U> void foo(U a) { }
template<> void foo<int>(int a) { } // note the <int>
};
which is what requires handling `ClassScopeFunctionSpecializationDecl::getTemplateArgsAsWritten()`
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