llvm / llvm/llvm-project

[clangd] Invalid rename when bringing constructor of templated base into scope

Open
#161,990 1 comment 0 reactions 0 assignees View on GitHub
clangd invalid-code-generation
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Given:
```cpp
using foo = int;

template
struct A {};

struct B : A {
using A::A;
};
```
Hovering over `foo` and renaming it to `bar` causes this invalid transformation:
```cpp
using bar = int;

template
struct A {};

struct B : A {
using A::bar;
// ^^^
// Should stay as "A", not be changed to "bar"
};
```
Tested with clangd 20.1.4.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.