Source Analyzer is a simple clang compiler plugin for source characterizing applications.
SourceAnalyzer is a simple clang compiler plugin for source characterizing applications. It walks the AST of an application and classifies nodes into categories such as for statement, if statement, etc. It was used in this work (CHO: A Benchmark Suite for OpenCL-based FPGA Accelerators).
SourceAnalyzer was tested with LLVM 3.4 /clang 3.4 and may not compile with other versions of LLVM or clang as APIs may differ. The latest information about clang plugins can be found here
$ export BD=/path/to/build/directory
$ clang -cc1 -load $BD/lib/libSourceAnalyzer.so some-input-file.c