summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-07-02 23:16:10 +0000
committerTed Kremenek <kremenek@apple.com>2008-07-02 23:16:10 +0000
commitf1f17555bd2b547d5626511b3822ee414c1dd5d8 (patch)
treef937b6596216f72b2d89203397b897154abe0572
parent5adfcb5783312150eb47890579ed7ac0f0b09ff4 (diff)
downloadbcm5719-llvm-f1f17555bd2b547d5626511b3822ee414c1dd5d8.tar.gz
bcm5719-llvm-f1f17555bd2b547d5626511b3822ee414c1dd5d8.zip
ccc-analyzer now dispatches the options "-checker-cfref" and "-warn-dead-stores" to clang instead of just "-checker-cfref".
llvm-svn: 53053
-rwxr-xr-xclang/utils/ccc-analyzer11
-rwxr-xr-xclang/utils/scan-build6
2 files changed, 8 insertions, 9 deletions
diff --git a/clang/utils/ccc-analyzer b/clang/utils/ccc-analyzer
index e7b74c05f9c..23b1ce33547 100755
--- a/clang/utils/ccc-analyzer
+++ b/clang/utils/ccc-analyzer
@@ -70,7 +70,7 @@ def analyze(clang, args,language,output,files,verbose,htmldir,file,analysis_type
i += 1
if verbose == 2:
- print >> sys.stderr, '#SHELL (cd ' + os.getcwd() + ' && ' + ' '.join(command + print_args) + ')\n'
+ print >> sys.stderr, '#SHELL (cd ' + os.getcwd() + ' && ' + ' '.join(print_args) + ')\n'
if RunAnalyzer and htmldir is not None:
args.append('-o')
@@ -81,7 +81,7 @@ def analyze(clang, args,language,output,files,verbose,htmldir,file,analysis_type
if verbose == 1:
# We MUST print to stderr. Some clients use the stdout output of
# gcc for various purposes.
- print >> sys.stderr, ' '.join(command+print_args)
+ print >> sys.stderr, ' '.join(print_args)
print >> sys.stderr, '\n'
subprocess.call(args)
@@ -136,7 +136,7 @@ def main(args):
if analysis_type is not None:
analysis_type = "-" + analysis_type
else:
- analysis_type = "-checker-cfref"
+ analysis_type = "-warn-dead-stores -checker-cfref"
# Determine the level of verbosity.
if os.environ.get('CCC_ANALYZER_VERBOSE') is not None:
@@ -152,10 +152,7 @@ def main(args):
clang = clang_env
# Get the HTML output directory.
- htmldir = None
-
- if analysis_type == "-checker-cfref":
- htmldir = os.environ.get('CCC_ANALYZER_HTML')
+ htmldir = os.environ.get('CCC_ANALYZER_HTML')
# Process the arguments.
i = 0
diff --git a/clang/utils/scan-build b/clang/utils/scan-build
index f881cc8ea67..23bda909b67 100755
--- a/clang/utils/scan-build
+++ b/clang/utils/scan-build
@@ -634,7 +634,7 @@ ENDTEXT
my $HtmlDir; # Parent directory to store HTML files.
my $IgnoreErrors = 0; # Ignore build errors.
my $ViewResults = 0; # View results when the build terminates.
-my $Analysis = "checker-cfref";
+my $Analysis;
if (!@ARGV) {
DisplayHelp();
@@ -753,7 +753,9 @@ if ($Verbose >= 3) {
$ENV{'CCC_ANALYZER_LOG'} = 1;
}
-$ENV{'CCC_ANALYZER_ANALYSIS'} = $Analysis;
+if (defined($Analysis)) {
+ $ENV{'CCC_ANALYZER_ANALYSIS'} = $Analysis;
+}
# Run the build.
OpenPOWER on IntegriCloud