When you dump the AST of a C program using clang, each node in the tree has a unique hexcode.
https://stephenwzl.github.io/images/ast-dump.png
For example, x in the above image has 0x7efcf7017538.
I am trying to do some calculations based on the AST of C programs. I need to be able to connect variable references with their previous use and assignments. I think the best way to do this is to use the unique hexcode clang assigns to a VarDecl. I've tried looking through the clang API and reverse engineering the dump function, but i can't seem to find how this value is stored. I'm using the recursive visitor to walk the tree. Is there a variable I have to reference for a node or a function I have to call on a node?