diff options
author | dim <dim@FreeBSD.org> | 2013-06-10 20:45:12 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-06-10 20:45:12 +0000 |
commit | ea266cad53e3d49771fa38103913d3ec7a166694 (patch) | |
tree | 8f7776b7310bebaf415ac5b69e46e9f928c37144 /tools/scan-build | |
parent | c72c57c9e9b69944e3e009cd5e209634839581d3 (diff) | |
download | FreeBSD-src-ea266cad53e3d49771fa38103913d3ec7a166694.zip FreeBSD-src-ea266cad53e3d49771fa38103913d3ec7a166694.tar.gz |
Vendor import of clang tags/RELEASE_33/final r183502 (effectively, 3.3
release):
http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_33/final@183502
Diffstat (limited to 'tools/scan-build')
-rwxr-xr-x[l---------] | tools/scan-build/c++-analyzer | 9 | ||||
-rwxr-xr-x | tools/scan-build/ccc-analyzer | 2 | ||||
-rwxr-xr-x | tools/scan-build/scan-build | 16 | ||||
-rw-r--r-- | tools/scan-build/scan-build.bat | 1 |
4 files changed, 23 insertions, 5 deletions
diff --git a/tools/scan-build/c++-analyzer b/tools/scan-build/c++-analyzer index ca10bf5..dda5db9 120000..100755 --- a/tools/scan-build/c++-analyzer +++ b/tools/scan-build/c++-analyzer @@ -1 +1,8 @@ -ccc-analyzer
\ No newline at end of file +#!/usr/bin/env perl + +use Cwd qw/ abs_path /; +use File::Basename qw/ dirname /; +# Add scan-build dir to the list of places where perl looks for modules. +use lib dirname(abs_path($0)); + +do 'ccc-analyzer'; diff --git a/tools/scan-build/ccc-analyzer b/tools/scan-build/ccc-analyzer index bb6dd95..60b0185 100755 --- a/tools/scan-build/ccc-analyzer +++ b/tools/scan-build/ccc-analyzer @@ -491,7 +491,7 @@ foreach (my $i = 0; $i < scalar(@ARGV); ++$i) { while ($Cnt > 0) { ++$i; --$Cnt; push @CompileOpts, $ARGV[$i]; } next; } - if ($Arg =~ /-msse.*/) { + if ($Arg =~ /-m.*/) { push @CompileOpts,$Arg; next; } diff --git a/tools/scan-build/scan-build b/tools/scan-build/scan-build index 32eecc0..35f852e 100755 --- a/tools/scan-build/scan-build +++ b/tools/scan-build/scan-build @@ -931,11 +931,13 @@ sub RunXcodebuild { if ($oldBehavior == 0) { my $OutputDir = $Options->{"OUTPUT_DIR"}; my $CLANG = $Options->{"CLANG"}; + my $OtherFlags = $Options->{"CCC_ANALYZER_ANALYSIS"}; push @$Args, "RUN_CLANG_STATIC_ANALYZER=YES", "CLANG_ANALYZER_OUTPUT=plist-html", "CLANG_ANALYZER_EXEC=$CLANG", - "CLANG_ANALYZER_OUTPUT_DIR=$OutputDir"; + "CLANG_ANALYZER_OUTPUT_DIR=$OutputDir", + "CLANG_ANALYZER_OTHER_FLAGS=$OtherFlags"; return (system(@$Args) >> 8); } @@ -1560,8 +1562,16 @@ if ($ForceDisplayHelp || $RequestDisplayHelp) { } $ClangCXX = $Clang; -$ClangCXX =~ s/\-\d+\.\d+$//; -$ClangCXX .= "++"; +# Determine operating system under which this copy of Perl was built. +my $IsWinBuild = ($^O =~/msys|cygwin|MSWin32/); +if($IsWinBuild) { + $ClangCXX =~ s/.exe$/++.exe/; +} +else { + $ClangCXX =~ s/\-\d+\.\d+$//; + $ClangCXX .= "++"; +} + # Make sure to use "" to handle paths with spaces. $ClangVersion = HtmlEscape(`"$Clang" --version`); diff --git a/tools/scan-build/scan-build.bat b/tools/scan-build/scan-build.bat new file mode 100644 index 0000000..77be674 --- /dev/null +++ b/tools/scan-build/scan-build.bat @@ -0,0 +1 @@ +perl -S scan-build %*
|