forked from rust-lang/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Clang][Index] Add support for dependent class scope explicit special…
…izations of function templates to USRGenerator (llvm#98027) Given the following: ``` template<typename T> struct A { void f(int); // #1 template<typename U> void f(U); // rust-lang#2 template<> void f<int>(int); // rust-lang#3 }; ``` Clang will generate the same USR for `#1` and `rust-lang#2`. This patch fixes the issue by including the template arguments of dependent class scope explicit specializations in their USRs.
- Loading branch information
1 parent
359c64f
commit d528537
Showing
2 changed files
with
28 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// 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# | | ||
}; |