[cfe-commits] r58344 - /cfe/trunk/utils/scan-build

Ted Kremenek kremenek at apple.com
Tue Oct 28 12:56:54 PDT 2008


Author: kremenek
Date: Tue Oct 28 14:56:52 2008
New Revision: 58344

URL: http://llvm.org/viewvc/llvm-project?rev=58344&view=rev
Log:
Patch by Nikita Zhuk:

The attached patch adds a checkbox to the scan-build summary report, which toggles all other checkboxes' states.

Modified:
    cfe/trunk/utils/scan-build

Modified: cfe/trunk/utils/scan-build
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/scan-build?rev=58344&r1=58343&r2=58344&view=diff

==============================================================================
--- cfe/trunk/utils/scan-build (original)
+++ cfe/trunk/utils/scan-build Tue Oct 28 14:56:52 2008
@@ -489,6 +489,18 @@
   }
 }
 
+function CopyCheckedStateToCheckButtons(SummaryCheckButton) {
+  var Inputs = document.getElementsByTagName("input");
+  for ( var i = 0 ; i < Inputs.length; ++i ) {
+    if (Inputs[i].type == "checkbox") {
+      if(Inputs[i] != SummaryCheckButton) {
+        Inputs[i].checked = SummaryCheckButton.checked;
+        Inputs[i].onclick();
+	  }
+    }
+  }
+}
+
 function ToggleDisplay(CheckButton, ClassName) {
   if (CheckButton.checked) {
     SetDisplay(ClassName, "");
@@ -536,9 +548,12 @@
       print OUT "\n<p>Results in this analysis run are based on analyzer build <b>$BuildName</b>.</p>\n"
     }
   
+  
+  my $TotalBugs = scalar(@Index);
 print OUT <<ENDTEXT;
 <table>
 <thead><tr><td>Bug Type</td><td>Quantity</td><td class="sorttable_nosort">Display?</td></tr></thead>
+<tr style="font-weight:bold"><td class="SUMM_DESC">All Bugs</td><td class="Q">$TotalBugs</td><td><center><input type="checkbox" onClick="CopyCheckedStateToCheckButtons(this);" checked/></center></td></tr>
 ENDTEXT
   
     my $last_category;
@@ -562,7 +577,7 @@
       $x =~ s/[ ,'":\/()]+/_/g;
       print OUT "<tr><td class=\"SUMM_DESC\">";
       print OUT $val->[2];
-      print OUT "</td><td>";
+      print OUT "</td><td class=\"Q\">";
       print OUT $val->[0];
       print OUT "</td><td><center><input type=\"checkbox\" onClick=\"ToggleDisplay(this,'bt_$x');\" checked/></center></td></tr>\n";
     }





More information about the cfe-commits mailing list