[cfe-commits] r56858 - /cfe/trunk/tools/scan-view/Reporter.py

Ted Kremenek kremenek at apple.com
Tue Sep 30 10:12:32 PDT 2008


Author: kremenek
Date: Tue Sep 30 12:12:32 2008
New Revision: 56858

URL: http://llvm.org/viewvc/llvm-project?rev=56858&view=rev
Log:
Make "Performance" the default Radar classification for leaks.  "Other" for all others (for now).

Modified:
    cfe/trunk/tools/scan-view/Reporter.py

Modified: cfe/trunk/tools/scan-view/Reporter.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-view/Reporter.py?rev=56858&r1=56857&r2=56858&view=diff

==============================================================================
--- cfe/trunk/tools/scan-view/Reporter.py (original)
+++ cfe/trunk/tools/scan-view/Reporter.py Tue Sep 30 12:12:32 2008
@@ -58,12 +58,15 @@
     self.values = values
     
   def getHTML(self,r,bugtype,getConfigOption):
+    default = self.getValue(r,bugtype,getConfigOption)
     return """\
 <tr>
 <td class="form_clabel">%s:</td><td class="form_value"><select name="%s_%s">
 %s
 </select></td>"""%(self.getName(),r.getName(),self.getName(),'\n'.join(["""\
-<option value="%s">%s</option>"""%(o[0],o[1]) for o in self.values]))
+<option value="%s"%s>%s</option>"""%(o[0],
+                                     o[0] == default and ' selected="selected"' or '',
+                                     o[1]) for o in self.values]))
 
 #===------------------------------------------------------------------------===#
 # Reporters
@@ -157,6 +160,12 @@
 
   def saveConfigValue(self):
     return False
+    
+  def getValue(self,r,bugtype,getConfigOption):
+    if bugtype.startswith("leak"):
+      return '3'
+    else:
+      return '7'
 
 class RadarReporter:
     @staticmethod





More information about the cfe-commits mailing list