llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.06k stars 11.98k forks source link

clangd: renaming class template breaks 'friend class' declarations #63932

Open strager opened 1 year ago

strager commented 1 year ago
template<class C>
class A {  // <--
  class B {
    friend class A;
  };
};

If I hover over A and rename it to A2 using clangd, the output is invalid:

template<class C>
class A2 {
  class B {
    friend A2 A;  // <-- invalid syntax
  };
};

llvm-project version: 16.0.1 cd89023f797900e4492da58b7bed36f702120011

llvmbot commented 1 year ago

@llvm/issue-subscribers-clangd