[all-commits] [llvm/llvm-project] d52853: [Clang][Index] Add support for dependent class sco...

Krystian Stasiowski via All-commits all-commits at lists.llvm.org
Mon Jul 8 11:53:02 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d52853760183a25758659863b1b940e9502eaa88
      https://github.com/llvm/llvm-project/commit/d52853760183a25758659863b1b940e9502eaa88
  Author: Krystian Stasiowski <sdkrystian at gmail.com>
  Date:   2024-07-08 (Mon, 08 Jul 2024)

  Changed paths:
    M clang/lib/Index/USRGeneration.cpp
    A clang/test/Index/USR/func-template.cpp

  Log Message:
  -----------
  [Clang][Index] Add support for dependent class scope explicit specializations of function templates to USRGenerator (#98027)

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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list