clangd icon indicating copy to clipboard operation
clangd copied to clipboard

go-to-def doesn't jump to template template parameter decl.

Open hokein opened this issue 2 years ago • 1 comments

Given the following dependent code:

template<template<typename> typename X, typename Y>
void k() {
  X a;  // issue: go-to-def on X does nothing
  Y b; // good: go-to-def on Y jumps to the template parameter Y
}

We probably miss something when handling the DeducedTemplateSpecializationType in FindTarget.cpp

hokein avatar Dec 15 '23 10:12 hokein

My first thought was that X a; is not a valid usage of a template-name X.

But since C++17, it is (the template arguments could be deduced using CTAD).

HighCommander4 avatar Dec 15 '23 10:12 HighCommander4