From 56d91b49b13fe55c918afbda19f6165b5fbff87a Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 15 Aug 2012 20:02:54 +0000 Subject: Vendor import of clang trunk r161861: http://llvm.org/svn/llvm-project/cfe/trunk@161861 --- tools/scan-build/ccc-analyzer | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'tools/scan-build/ccc-analyzer') diff --git a/tools/scan-build/ccc-analyzer b/tools/scan-build/ccc-analyzer index d01bd0fa45aa..c7636f9e8e8f 100755 --- a/tools/scan-build/ccc-analyzer +++ b/tools/scan-build/ccc-analyzer @@ -182,11 +182,6 @@ sub Analyze { } else { $Cmd = $Clang; - if ($Lang eq "objective-c" || $Lang eq "objective-c++") { - push @Args,'-DIBOutlet=__attribute__((iboutlet))'; - push @Args,'-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection)))'; - push @Args,'-DIBAction=void)__attribute__((ibaction)'; - } # Create arguments for doing regular parsing. my $SyntaxArgs = GetCCArgs("-fsyntax-only", \@Args); @@ -352,6 +347,8 @@ my %LinkerOptionMap = ( my %CompilerLinkerOptionMap = ( '-fobjc-arc' => 0, '-fobjc-abi-version' => 0, # This is really a 1 argument, but always has '=' + '-fobjc-legacy-dispatch' => 0, + '-mios-simulator-version-min' => 0, # This really has 1 argument, but always has '=' '-isysroot' => 1, '-arch' => 1, '-m32' => 0, @@ -434,12 +431,18 @@ if ($Status) { exit($Status >> 8); } # Get the analysis options. my $Analyses = $ENV{'CCC_ANALYZER_ANALYSIS'}; +# Get the plugins to load. +my $Plugins = $ENV{'CCC_ANALYZER_PLUGINS'}; + # Get the store model. my $StoreModel = $ENV{'CCC_ANALYZER_STORE_MODEL'}; # Get the constraints engine. my $ConstraintsModel = $ENV{'CCC_ANALYZER_CONSTRAINTS_MODEL'}; +#Get the internal stats setting. +my $InternalStats = $ENV{'CCC_ANALYZER_INTERNAL_STATS'}; + # Get the output format. my $OutputFormat = $ENV{'CCC_ANALYZER_OUTPUT_FORMAT'}; if (!defined $OutputFormat) { $OutputFormat = "html"; } @@ -644,11 +647,19 @@ if ($Action eq 'compile' or $Action eq 'link') { if (defined $ConstraintsModel) { push @AnalyzeArgs, "-analyzer-constraints=$ConstraintsModel"; } + + if (defined $InternalStats) { + push @AnalyzeArgs, "-analyzer-stats"; + } if (defined $Analyses) { push @AnalyzeArgs, split '\s+', $Analyses; } + if (defined $Plugins) { + push @AnalyzeArgs, split '\s+', $Plugins; + } + if (defined $OutputFormat) { push @AnalyzeArgs, "-analyzer-output=" . $OutputFormat; if ($OutputFormat =~ /plist/) { -- cgit v1.2.3