[cfe-commits] r53654 - in /cfe/trunk/utils: ccc-analyzer scan-build
Ted Kremenek
kremenek at apple.com
Tue Jul 15 16:41:32 PDT 2008
Author: kremenek
Date: Tue Jul 15 18:41:32 2008
New Revision: 53654
URL: http://llvm.org/viewvc/llvm-project?rev=53654&view=rev
Log:
Have scan-build control default analyses.
Modified:
cfe/trunk/utils/ccc-analyzer
cfe/trunk/utils/scan-build
Modified: cfe/trunk/utils/ccc-analyzer
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ccc-analyzer?rev=53654&r1=53653&r2=53654&view=diff
==============================================================================
--- cfe/trunk/utils/ccc-analyzer (original)
+++ cfe/trunk/utils/ccc-analyzer Tue Jul 15 18:41:32 2008
@@ -135,10 +135,8 @@
# Set the analyzer flag.
analysis_type = os.environ.get('CCC_ANALYZER_ANALYSIS')
- if analysis_type is not None:
- analysis_type = "-" + analysis_type
- else:
- analysis_type = "-warn-dead-stores -checker-cfref -warn-objc-methodsigs"
+ if analysis_type is None:
+ analysis_type = "-checker-cfref"
# Determine the level of verbosity.
if os.environ.get('CCC_ANALYZER_VERBOSE') is not None:
Modified: cfe/trunk/utils/scan-build
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/scan-build?rev=53654&r1=53653&r2=53654&view=diff
==============================================================================
--- cfe/trunk/utils/scan-build (original)
+++ cfe/trunk/utils/scan-build Tue Jul 15 18:41:32 2008
@@ -99,7 +99,8 @@
my %AnalysesDefaultEnabled = (
'-warn-dead-stores' => 1,
'-checker-cfref' => 1,
- '-warn-objc-methodsigs' => 1
+ '-warn-objc-methodsigs' => 1,
+ '-warn-objc-missing-dealloc' => 1
);
##----------------------------------------------------------------------------##
@@ -827,10 +828,14 @@
$ENV{'CCC_ANALYZER_LOG'} = 1;
}
-if (scalar(@AnalysesToRun)) {
- $ENV{'CCC_ANALYZER_ANALYSIS'} = join ' ', at AnalysesToRun;
+if (scalar(@AnalysesToRun) == 0) {
+ foreach my $key (keys %AnalysesDefaultEnabled) {
+ push @AnalysesToRun,$key;
+ }
}
+$ENV{'CCC_ANALYZER_ANALYSIS'} = join ' ', at AnalysesToRun;
+
# Run the build.
my $ExitStatus = RunBuildCommand(\@ARGV, $IgnoreErrors, $Cmd);
More information about the cfe-commits
mailing list