Skip to content

ClassScopeFunctionSpecializationDecl should not use the USR of its corresponding CXXMethodDecl #208

Closed
@sdkrystian

Description

@sdkrystian

Currently, if a class scope explicit specialization of a member function template of a class template has the same type as another non-template member function, they will both generate the same USR. This is because we generate the explicit specializations USR from the CXXMethodDecl returned by ClassScopeFunctionSpecializationDecl::getSpecialization. For example:

template<typename T>
struct A
{
    void f(int); // #1
    
    template<typename U>
    void f(U); // #2
    
    template<>
    void f<int>(int); // #3
};

Currently, functions 1 and 3 generate the same USR. This can be fixed by generating the USR for function 3 using the ClassScopeFunctionSpecializationDecl.

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions