[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)
Andrey Ali Khan Bolshakov via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 5 08:54:14 PDT 2024
bolshakov-a wrote:
When instantiating such an alias:
```cpp
template <typename T>
using Identity = T;
```
before the patch:
```
TemplateSpecializationType 0x5555676f0a60 'Identity<IndirectClass>' sugar alias
|-name: 'Identity' qualified
| `-TypeAliasTemplateDecl 0x5555676c91d8 Identity
|-TemplateArgument type 'IndirectClass'
| `-ElaboratedType 0x5555676c9250 'IndirectClass' sugar
| `-RecordType 0x5555676c8430 'class IndirectClass'
| `-CXXRecord 0x5555676c8398 'IndirectClass'
`-SubstTemplateTypeParmType 0x5555676f0a20 'class IndirectClass' sugar typename depth 0 index 0 T
|-TypeAliasTemplate 0x5555676c91d8 'Identity'
`-RecordType 0x5555676c8430 'class IndirectClass'
`-CXXRecord 0x5555676c8398 'IndirectClass'
```
After the patch:
```
TemplateSpecializationType 0x5555676f0a30 'Identity<IndirectClass>' sugar alias
|-name: 'Identity' qualified
| `-TypeAliasTemplateDecl 0x5555676c91d8 Identity
|-TemplateArgument type 'IndirectClass'
| `-ElaboratedType 0x5555676c9250 'IndirectClass' sugar
| `-RecordType 0x5555676c8430 'class IndirectClass'
| `-CXXRecord 0x5555676c8398 'IndirectClass'
`-ElaboratedType 0x5555676c9250 'IndirectClass' sugar
`-RecordType 0x5555676c8430 'class IndirectClass'
`-CXXRecord 0x5555676c8398 'IndirectClass'
```
@mizvekov, do you have any idea how to get back the lost `SubstTemplateTypeParmType`? It plays an important role in the IWYU tool analysis. Thanks!
https://github.com/llvm/llvm-project/pull/101858
More information about the lldb-commits
mailing list