From: Ted Kremenek Date: Tue, 1 Apr 2008 21:22:03 +0000 (+0000) Subject: Added help text for scan-build. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b74ab6fdf0e3ed455bf6e0d30e24845f0c2846e;p=clang Added help text for scan-build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49051 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/scan-build b/utils/scan-build index 4d86040976..84bcf0a2ef 100755 --- a/utils/scan-build +++ b/utils/scan-build @@ -149,8 +149,43 @@ sub Postprocess() { sub DisplayHelp() { - - +print < [build options] + +OPTIONS: + + -o - Target directory for HTML report files. Subdirectories + Will be created as needed to represent separate "runs" of + the analyzer. If this option is not specified, a directory + is created in /tmp to store the reports. + + -? - Display this message. + --help + + -k - Add "keep on going option" to the specified build command. + --keep-going This command currently supports "make" and "xcodebuild." You + can also specify the corresponding option to the build command + directly as a build option if you know it. + + -v - Verbose output from scan-build and the analyzer. A second + "-v" increases verbosity. + + +BUILD OPTIONS + + You can specify any build option acceptable to the build command. For example: + + scan-build -o /tmp/myhtmldir make -j4 + + The above causes analysis reports to be deposited in /tmp/myhtmldir (or + rather a subdirectory corresponding to this particular running of the + analyzer), and causes "make" to be run with the "-j4" option, allowing + parallel builds (and parallel invocations of the analyzer). + + NOTE: The analyzer will work for most parallel builds, but not distributed + builds (such as using distcc). + +ENDTEXT } ##----------------------------------------------------------------------------## @@ -171,7 +206,7 @@ while (@ARGV) { my $arg = $ARGV[0]; - if ($arg eq "-?") { + if ($arg eq "-?" or $arg eq "--help") { DisplayHelp(); exit 1; } @@ -188,7 +223,7 @@ while (@ARGV) { next; } - if ($arg eq "-k") { + if ($arg eq "-k" or $arg eq "--keep-going") { shift @ARGV; $IgnoreErrors = 1; next;