[cfe-dev] Full program Analysis w. Clang

Alexandros Tzannes atzannes at illinois.edu
Mon Jun 11 18:23:17 PDT 2012

Hi all,
I am interested in using Clang to write a checker that reads in custom annotations (we are considering using attributes rather than pragmas) to guarantee the absence of some types of bugs. The next step after this is done would be to try and infer as many of the annotations as possible, but this will require whole program analysis. I know that clang works per translation unit (TU), so I was wondering if there is some advice on how to go about it. Perhaps serialize the AST of different TUs, merge them and analyze the whole program offline (after compilation) to prove the desired safety guarantees. It may actually be possible to perform inference per TU, as long as any cyclic call-graph dependencies are within a single TU.

Any feedback/brainstorming will be greatly appreciated!


More information about the cfe-dev mailing list