| Issue |
108015
|
| Summary |
mangleCXXCtorVTable mangles an incorrect name
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
tcwzxx
|
```C++
namespace A {
class VBase {
public:
virtual ~VBase() {};
};
struct Wrap {};
template <typename T>
class Impl : public virtual VBase {
public:
};
} // namespace A
struct Inst : public A::Impl<A::Wrap> {};
void Test() { Inst a; }
```
The code above will generate a `CtorVTable` with the name `_ZTC4Inst0_N1A4ImplINS_4WrapEEE`. After demangling, the result is `construction vtable for A::Impl<Inst::Wrap>-in-Inst`. However, `Inst::Wrap` is incorrect.
https://github.com/llvm/llvm-project/blob/b0ffaa79050460d724eec1b12363c439b43d5ae5/clang/lib/AST/ItaniumMangle.cpp#L7327-L7338
because `mangleNameOrStandardSubstitution` never adds `RD` as a substitution
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs