]> granicus.if.org Git - clang/commitdiff
When known, include the analyzer build in the output of scan-build.
authorTed Kremenek <kremenek@apple.com>
Fri, 23 May 2008 18:17:05 +0000 (18:17 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 23 May 2008 18:17:05 +0000 (18:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51492 91177308-0d34-0410-b5e6-96231b3b80d8

utils/scan-build

index c6647cd1b9086994d4af28720dccf786bbacd425..f1905833ce3033fa9ee584f4f4404ed37bacb2ba 100755 (executable)
@@ -21,6 +21,8 @@ use File::Basename;
 
 my $Verbose = 0;       # Verbose output from this script.
 my $Prog = "scan-build";
+my $BuildName;
+my $BuildDate;
 
 ##----------------------------------------------------------------------------##
 # GetHTMLRunDir - Construct an HTML directory name for the current run.
@@ -373,9 +375,14 @@ ENDTEXT
       $Totals{$bug_type}++;
     }
   }
-
+  
+  print OUT "<h3>Summary</h3>";
+    
+  if (defined($BuildName)) {
+    print OUT "\n<p>Results in this analysis run are based on analyzer build <b>$BuildName</b>.</p>\n"
+  }
+  
 print OUT <<ENDTEXT;
-<h3>Summary</h3>
 <table class="sortable">
 <tr>
   <td>Bug Type</td>
@@ -521,6 +528,13 @@ sub DisplayHelp {
 print <<ENDTEXT;
 USAGE: $Prog [options] <build command> [build options]
 
+ENDTEXT
+
+  if (defined($BuildName)) {
+    print "ANALYZER BUILD: $BuildName ($BuildDate)\n\n";
+  }
+
+print <<ENDTEXT;
 OPTIONS:
 
   -a            - The analysis to run.  The default is 'checker-cfref'.