[cfe-dev] Iterating over AST node objects
Pratyush Das via cfe-dev
cfe-dev at lists.llvm.org
Fri Oct 30 11:12:10 PDT 2020
Hi,
If I dump() a clang::Type object, I can see this AST representation -
ConstantArrayType 0x555562830ea0 'const char **const [0]' 0
`-QualType 0x555562830c81 'const char **const' const
`-PointerType 0x555562830c80 'const char **'
`-PointerType 0x5555627ed2a0 'const char *'
`-QualType 0x5555627ec7d1 'const char' const
`-BuiltinType 0x5555627ec7d0 'char'
Is there a way to use the ASTContext to iterate over each node? (Do each of
those lines represent a node?)
My motivation is to get the inner most PointerType object.
Regards,
--
Pratyush Das
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20201030/4cf11612/attachment.html>
More information about the cfe-dev
mailing list