Parent of a Stmt

Hi,
   I need to find the parent of a Stmt? How can I do this in clang (I am
parsing an AST)?

Regards,
Adil

I'm not sure if there are better ways but I've seen this accomplished in the clang/tools/extra/loop-convert tool. It runs an AST traversal and produces a parent map of its own. Then you can use that map later to get the info you need. May not be suitable for your situation but it's worth a look. You can find this project at http://llvm.org/git/clang-tools-extra.git.