[cfe-dev] C++ analysis with Clang?

Karl Mazurak mazurak at cs.wisc.edu
Fri Jun 1 18:36:36 PDT 2012


Hi all -

Our group is considering using Clang for some program analysis, 
primarily aimed at bug-hunting.  We're targeting C++, which I understand 
means the static analyzer isn't an option just yet, but it looks like 
there's still plenty there that could be useful - so much that I'm not 
sure what to start experimenting with.

The plugin tutorial uses a PluginASTAction and links to an example with 
a RecursiveASTVisitor, but of course we'd like to avoid reinventing the 
wheel (at coding time or at run time) as much as possible.  For 
instance, are CFGs pre-constructed somewhere?  Does the dataflow 
framework in Analysis/FlowSensitive work with C++?  Is this Sema of any 
use outside the path-sensitive analyzer?  And is there anything in Clang 
that could be useful in aggregating results together in whole program 
analysis?

Thanks!

-- 
Karl



More information about the cfe-dev mailing list