I'm writing an analysis tool for C language in Python and I am using clang python binding for this purpose. So far it has been great and I was able to get AST of the C files I have and process them. Now I need to find live variable at a certain point of program. By live variables I mean the variables that are used after that line of code before begin re-assigned. I noticed that clang already has some related code in liveVariables.h
.
Does anyone know how I can get it to work in the python binding?
How can I call liveVariables
functions by having the AST and TranslationUnit
?