USRGenerator has no visitor for TemplateParamObjectDecl, which is the AST node representing a class-type non-type template parameter. It falls through to VisitNamedDecl, which fails on the node's empty DeclarationName and sets IgnoreResults, discarding the USR of the enclosing declaration.
Any function or method whose signature mentions such a type gets no USR at all, and is silently dropped by USR consumers.
struct R { int a; };
template<R> struct L { };
void f(L<R{0}>);
$ c-index-test core -print-source-symbols -- -std=c++20 -x c++ t.cpp
3:6 | function/C | f | <no-usr> | __Z1f1LIXtl1REEE | Decl | rel: 0
We can see <no-usr>, which implies that USR generation fails.
USRGeneratorhas no visitor forTemplateParamObjectDecl, which is the AST node representing a class-type non-type template parameter. It falls through toVisitNamedDecl, which fails on the node's emptyDeclarationNameand setsIgnoreResults, discarding the USR of the enclosing declaration.Any function or method whose signature mentions such a type gets no USR at all, and is silently dropped by USR consumers.
We can see
<no-usr>, which implies that USR generation fails.