[cfe-commits] r168805 - /cfe/trunk/tools/scan-build/ccc-analyzer

Jordan Rose jordan_rose at apple.com
Wed Nov 28 11:12:44 PST 2012


Author: jrose
Date: Wed Nov 28 13:12:44 2012
New Revision: 168805

URL: http://llvm.org/viewvc/llvm-project?rev=168805&view=rev
Log:
[analyzer] scan-build: Don't forget to close our temp file for Clang's output.

Also, minor whitespace/indentation fixes.

Patch by Peeter Joot!

Modified:
    cfe/trunk/tools/scan-build/ccc-analyzer

Modified: cfe/trunk/tools/scan-build/ccc-analyzer
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-build/ccc-analyzer?rev=168805&r1=168804&r2=168805&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/ccc-analyzer (original)
+++ cfe/trunk/tools/scan-build/ccc-analyzer Wed Nov 28 13:12:44 2012
@@ -31,11 +31,11 @@
 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 @@
     print $ofh $_;
     print STDERR $_;
   }
+  close $ofh;
 
   waitpid($pid,0);
   close(FROM_CHILD);
@@ -269,7 +270,7 @@
                             $HtmlDir, $ParserRejects, $ofile);
       } else {
         ProcessClangFailure($Clang, $Lang, $file, \@CmdArgsSansAnalyses,
-                            $HtmlDir, $OtherError, $ofile);      	
+                            $HtmlDir, $OtherError, $ofile);
       }
     }
     else {
@@ -618,7 +619,7 @@
   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 @@
         $ResultFile = $f;
         # If the HtmlDir is not set, we sould clean up the plist files.
         if (!defined $HtmlDir || -z $HtmlDir) {
-        	$CleanupFile = $f; 
+          $CleanupFile = $f;
         }
       }
     }





More information about the cfe-commits mailing list