what's the best way to writing a code analyzer with clang?

Thanks. Is clangAnalysis the Clang Static Analyzer ? It’s a library and i check out some header files, but i do not know how to use this library. It seems there’s no document about this library. I want to write a static code analyzer, to get all functions/variables and other more details information from a file. Can you give me some more details about this ?

------------------ Original ------------------

Hi,

Since nobody replied yet, perhaps these pages can get you started ?

http://clang-analyzer.llvm.org/checker_dev_manual.html
http://clang-analyzer.llvm.org/potential_checkers.html

Regards,

John Smith.

On Behalf Of kevinlynx

Thanks. Is `clangAnalysis` the Clang Static Analyzer ? It's a library and i
check out some header files, but i do not know how to use this library. It
seems there's no document about this library. I want to write a static code
analyzer, to get all functions/variables and other more details information
from a file. Can you give me some more details about this ?

As I mentioned, Anna Zaks gave a talk on the subject of writing
analyses at the 2012 dev meeting. Details can be found here:

http://llvm.org/devmtg/2012-11/

specifically:
http://llvm.org/devmtg/2012-11/videos/Zaks-Rose-Checker24Hours.mp4