I was planning to work on a very similar thing by modifying the AST produced by clang, but I noticed that you analyze the source as it is. I am possibly going to contribute to this project, but I wanted to understand why not use clang AST instead. Possibly, your code will break, if someone does some unexpected modifications in the cursed code. --- I also wanted to make it even more pythonic by omitting return 0 and similar things.