================
@@ -2586,8 +2561,9 @@ bool 
CXXNameMangler::mangleUnresolvedTypeOrSimpleId(QualType Ty,
   }
 
   case Type::InjectedClassName:
-    mangleSourceNameWithAbiTags(
-        cast<InjectedClassNameType>(Ty)->getDecl());
+    mangleSourceNameWithAbiTags(cast<InjectedClassNameType>(Ty)
+                                    ->getOriginalDecl()
+                                    ->getDefinitionOrSelf());
----------------
bolshakov-a wrote:

I've caught an example:
```cpp
template <typename>
struct Tpl;

template <typename>
struct Tpl {
  Tpl(const Tpl&) {}
};
```
The injected name from the copy ctor prototype refers to the 
forward-declaration from the first two lines. Looks a little strange but Ok.

https://github.com/llvm/llvm-project/pull/147835
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to