From: Ted Kremenek Date: Tue, 15 Jul 2008 23:41:32 +0000 (+0000) Subject: Have scan-build control default analyses. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9012599f4ccfe066c093cf0885fd3994bdc256d1;p=clang Have scan-build control default analyses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53654 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/ccc-analyzer b/utils/ccc-analyzer index 98e083d8d2..8f342ecfe0 100755 --- a/utils/ccc-analyzer +++ b/utils/ccc-analyzer @@ -135,10 +135,8 @@ def main(args): # 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: diff --git a/utils/scan-build b/utils/scan-build index 6ee89decc9..a58751caf7 100755 --- a/utils/scan-build +++ b/utils/scan-build @@ -99,7 +99,8 @@ close (PIPE); 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 @@ if ($Verbose >= 3) { $ENV{'CCC_ANALYZER_LOG'} = 1; } -if (scalar(@AnalysesToRun)) { - $ENV{'CCC_ANALYZER_ANALYSIS'} = join ' ',@AnalysesToRun; +if (scalar(@AnalysesToRun) == 0) { + foreach my $key (keys %AnalysesDefaultEnabled) { + push @AnalysesToRun,$key; + } } +$ENV{'CCC_ANALYZER_ANALYSIS'} = join ' ',@AnalysesToRun; + # Run the build. my $ExitStatus = RunBuildCommand(\@ARGV, $IgnoreErrors, $Cmd);