diff options
| author | Jordan Rose <jordan_rose@apple.com> | 2012-11-28 19:12:44 +0000 |
|---|---|---|
| committer | Jordan Rose <jordan_rose@apple.com> | 2012-11-28 19:12:44 +0000 |
| commit | 85ff8f281e857da3e7cd8dd0a79ad0d3f2eb94d6 (patch) | |
| tree | 47477dc191a3ef4dc5bea80e2b071d83265f3aca | |
| parent | dbbbf551194b59738c6ca00e0f40afdc78d418e4 (diff) | |
| download | bcm5719-llvm-85ff8f281e857da3e7cd8dd0a79ad0d3f2eb94d6.tar.gz bcm5719-llvm-85ff8f281e857da3e7cd8dd0a79ad0d3f2eb94d6.zip | |
[analyzer] scan-build: Don't forget to close our temp file for Clang's output.
Also, minor whitespace/indentation fixes.
Patch by Peeter Joot!
llvm-svn: 168805
| -rwxr-xr-x | clang/tools/scan-build/ccc-analyzer | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/clang/tools/scan-build/ccc-analyzer b/clang/tools/scan-build/ccc-analyzer index 8bd9ec2724a..f94f804a29e 100755 --- a/clang/tools/scan-build/ccc-analyzer +++ b/clang/tools/scan-build/ccc-analyzer @@ -31,11 +31,11 @@ my $DefaultCCompiler; my $DefaultCXXCompiler; if (`uname -a` =~ m/Darwin/) { - $DefaultCCompiler = 'clang'; - $DefaultCXXCompiler = 'clang++'; + $DefaultCCompiler = 'clang'; + $DefaultCXXCompiler = 'clang++'; } else { - $DefaultCCompiler = 'gcc'; - $DefaultCXXCompiler = 'g++'; + $DefaultCCompiler = 'gcc'; + $DefaultCXXCompiler = 'g++'; } if ($FindBin::Script =~ /c\+\+-analyzer/) { @@ -252,6 +252,7 @@ sub Analyze { print $ofh $_; print STDERR $_; } + close $ofh; waitpid($pid,0); close(FROM_CHILD); @@ -269,7 +270,7 @@ sub Analyze { $HtmlDir, $ParserRejects, $ofile); } else { ProcessClangFailure($Clang, $Lang, $file, \@CmdArgsSansAnalyses, - $HtmlDir, $OtherError, $ofile); + $HtmlDir, $OtherError, $ofile); } } else { @@ -618,7 +619,7 @@ if ($Action eq 'compile' or $Action eq 'link') { my @Archs = keys %ArchsSeen; # Skip the file if we don't support the architectures specified. exit 0 if ($HadArch && scalar(@Archs) == 0); - + foreach my $file (@Files) { # Determine the language for the file. my $FileLang = $Lang; @@ -672,7 +673,7 @@ if ($Action eq 'compile' or $Action eq 'link') { $ResultFile = $f; # If the HtmlDir is not set, we sould clean up the plist files. if (!defined $HtmlDir || -z $HtmlDir) { - $CleanupFile = $f; + $CleanupFile = $f; } } } |

