Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sdkrystian opened this issue May 23, 2023 · 1 comment
Assignees
Labels
Bug Something isn't working

Comments

@sdkrystian
Copy link
Member

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.

@sdkrystian sdkrystian added the Bug Something isn't working label May 23, 2023
@sdkrystian sdkrystian self-assigned this May 23, 2023
@sdkrystian
Copy link
Member Author

Will be fixed by llvm/llvm-project#98027.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

1 participant