source: trunk/PrefsPane/bin/run-clang-static-analyzer.sh @ 1046

Revision 944, 841 bytes checked in by speck, 2 years ago (diff)

Misc minor fixes from llvm-clang.

  • Property svn:executable set to *
Line 
1#!/bin/sh
2
3# http://clang.llvm.org/StaticAnalysis.html
4
5# Put scan-build into your $PATH, if located elsewhere
6
7CLANG=/usr/local/llvm-clang
8PATH="$CLANG/bin:$PATH"
9
10rm -rf /tmp/scan-build-*
11
12# clean so we get a full rebuild and all files are analyzed (and not only the dirty ones)
13xcodebuild -target PrefsPane -configuration Static-analyzer clean > /dev/null
14
15time $CLANG/scan-build \
16         --view \
17         xcodebuild -target PrefsPane -configuration Static-analyzer \
18                OTHER_CFLAGS="-DDEBUG=1 -DSTATIC_ANALYSIS=1" \
19                OTHER_CPLUSPLUSFLAGS="-DDEBUG=1 -DSTATIC_ANALYSIS=1"
20#exit # --view option makes python crash.
21
22echo "#"
23echo "# Cleans build."
24echo "#"
25# clean again, so we dont have leftover *.o files from llvm-clang mixing with gcc files.
26xcodebuild -target PrefsPane -configuration Static-analyzer clean > /dev/null
27
28echo "# All done."
Note: See TracBrowser for help on using the repository browser.