kamleshbhalui added a comment.
In D70537#1765607 <https://reviews.llvm.org/D70537#1765607>, @probinson wrote:
> I guess first I'm confused about why the type would be undeduced in the first
> place, given that it is actually instantiated.
> And if undeduced is correct, wouldn't we rather emit these with
> DW_TAG_unspecified_type?
While emitting the debug info this is the AST (for given testcase), in which
static variable `value` is not yet deduced.
and when it tries to unwrap the type it fails.
|-CXXRecordDecl 0x30dc88 <col:1, col:8> col:8 implicit struct TypeId
|-VarDecl 0x30dd30 <line:3:5, col:31> col:23 used counter 'int' static inline
listinit
| `-InitListExpr 0x30ddd8 <col:30, col:31> 'int'
|-VarTemplateDecl 0x30df68 <line:5:5, line:6:50> col:30 identifier
| |-TemplateTypeParmDecl 0x30de18 <line:5:14> col:25 typename depth 0 index 0
...
| |-VarDecl 0x30df00 <line:6:5, col:50> col:30 identifier 'const int':'const
int' static inline cinit
| | `-UnaryOperator 0x30dfe0 <col:43, col:50> 'int' postfix '++'
| | `-DeclRefExpr 0x30dfc0 <col:43> 'int' lvalue Var 0x30dd30 'counter'
'int'
| `-VarTemplateSpecializationDecl 0x341f30 <col:5, col:50> col:30 referenced
identifier 'const int':'const int' static inline cinit
| |-TemplateArgument pack
| | `-TemplateArgument type 'int'
| `-UnaryOperator 0x30dfe0 <col:43, col:50> 'int' postfix '++'
| `-DeclRefExpr 0x30dfc0 <col:43> 'int' lvalue Var 0x30dd30 'counter'
'int'
|-VarTemplateDecl 0x30e228 <line:8:5, line:9:56> col:30 value
| |-TemplateTypeParmDecl 0x30e128 <line:8:14, col:26> col:26 referenced
typename depth 0 index 0 ... Args
| |-VarDecl 0x30e1c0 <line:9:5, col:56> col:30 value 'const auto' static
inline cinit
| | `-UnresolvedLookupExpr 0x30e2f8 <col:38, col:56> '<dependent type>'
lvalue (no ADL) = 'identifier' 0x30df68
| `-VarTemplateSpecializationDecl 0x30e698 <col:5, col:30> col:30 value
'const auto' static inline
| `-TemplateArgument pack
| `-TemplateArgument type 'int'
|-VarTemplateSpecializationDecl 0x30e698 <col:5, col:30> col:30 value 'const
auto' static inline
| `-TemplateArgument pack
| `-TemplateArgument type 'int'
`-VarTemplateSpecializationDecl 0x341f30 <line:6:5, col:50> col:30 referenced
identifier 'const int':'const int' static inline cinit
|-TemplateArgument pack
| `-TemplateArgument type 'int'
`-UnaryOperator 0x30dfe0 <col:43, col:50> 'int' postfix '++'
`-DeclRefExpr 0x30dfc0 <col:43> 'int' lvalue Var 0x30dd30 'counter' 'int'
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70537/new/
https://reviews.llvm.org/D70537
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits