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

Anna Zaks ganna at apple.com
Fri Sep 9 11:43:53 PDT 2011


Author: zaks
Date: Fri Sep  9 13:43:53 2011
New Revision: 139382

URL: http://llvm.org/viewvc/llvm-project?rev=139382&view=rev
Log:
[analyzer] When running scan-build with -plist on ./configure, delete the plist files.
(scan-build does not set the $HtmlDir when running against configure. Previously, this implied that the plist files would appear in the current directory, with this patch they will get deleted.)

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=139382&r1=139381&r2=139382&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/ccc-analyzer (original)
+++ cfe/trunk/tools/scan-build/ccc-analyzer Fri Sep  9 13:43:53 2011
@@ -55,7 +55,10 @@
 
 # Remove any stale files at exit.
 END { 
-  if (defined $CleanupFile && -z $CleanupFile) {
+  if (defined $ResultFile && -z $ResultFile) {
+    `rm -f $ResultFile`;
+  }
+  if (defined $CleanupFile) {
     `rm -f $CleanupFile`;
   }
 }
@@ -631,7 +634,10 @@
         my ($h, $f) = tempfile("report-XXXXXX", SUFFIX => ".plist",
                                DIR => $HtmlDir);
         $ResultFile = $f;
-        $CleanupFile = $f;
+        # If the HtmlDir is not set, we sould clean up the plist files.
+        if (!defined $HtmlDir || -z $HtmlDir) {
+        	$CleanupFile = $f; 
+        }
       }
     }
 





More information about the cfe-commits mailing list