Skip to content

Instantly share code, notes, and snippets.

@kallewoof
Created April 16, 2018 04:23
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kallewoof/8984c56399e8d23ee54dd695d2660b7a to your computer and use it in GitHub Desktop.
Save kallewoof/8984c56399e8d23ee54dd695d2660b7a to your computer and use it in GitHub Desktop.
Clang Static Analyzer Setup

Setting up Clang Static Analyzer on macOS

Using it

  • Go to e.g. ~/workspace/myproject
  • Compile it from scratch, including autogen parts, with make clean, but prefix each call with the scan-build in the path above. E.g.
$ ~/workspace/checker-279/bin/scan-build ./autogen.sh
$ ~/workspace/checker-279/bin/scan-build ./configure --enable-debug
$ ~/workspace/checker-279/bin/scan-build make clean
$ ~/workspace/checker-279/bin/scan-build make -j5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment