
Given the following: ``` template<typename T> struct A { void f(int); // #1 template<typename U> void f(U); // #2 template<> void f<int>(int); // #3 }; ``` Clang will generate the same USR for `#1` and `#2`. This patch fixes the issue by including the template arguments of dependent class scope explicit specializations in their USRs.
16 lines
431 B
C++
16 lines
431 B
C++
// RUN: c-index-test core -print-source-symbols -- %s | FileCheck %s
|
|
|
|
template<typename T>
|
|
struct A {
|
|
void f(int);
|
|
// CHECK: {{[0-9]+}}:8 | instance-method/C++ | f | c:@ST>1#T@A@F@f#I# |
|
|
|
|
template<typename U>
|
|
void f(U);
|
|
// CHECK: {{[0-9]+}}:8 | instance-method/C++ | f | c:@ST>1#T@A@FT@>1#Tf#t1.0#v# |
|
|
|
|
template<>
|
|
void f<int>(int);
|
|
// CHECK: {{[0-9]+}}:8 | instance-method/C++ | f | c:@ST>1#T@A@F@f<#I>#I# |
|
|
};
|