All, I've been working on porting some code forward from an older
version of Clang. We have Clang transformation that walks the AST,
performs some basic functional modifications and drops out the
equivalent representation for further compilation. We're having
issues with copying TypedefDecl nodes correctly and maintaining their
parent references. Consider the following:
However, if we dump the AST immediately following the Create, we get
an anonymous struct as follows:
TypedefDecl 0x55a568c31800 <foo.c:16:1, line:19:3> col:3 BufferBase
'struct (anonymous struct at foo.c:16:9)':'struct (anonymous at
`-ElaboratedType 0x55a568c317b0 'struct (anonymous struct at foo.c:16:9)' sugar
`-RecordType 0x55a568c314f0 'struct (anonymous at foo.c:16:9)'
`-Record 0x55a568c31468 ''