[PATCH] D42819: [analyzer] [tests] [NFC] Remove dead code from CmpRuns

George Karpenkov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 1 14:43:39 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rC324027: [analyzer] [tests] [NFC] Remove dead code from CmpRuns (authored by george.karpenkov, committed by ).
Herald added a subscriber: cfe-commits.

Repository:
  rC Clang

https://reviews.llvm.org/D42819

Files:
  utils/analyzer/CmpRuns.py


Index: utils/analyzer/CmpRuns.py
===================================================================
--- utils/analyzer/CmpRuns.py
+++ utils/analyzer/CmpRuns.py
@@ -203,10 +203,8 @@
     compareResults - Generate a relation from diagnostics in run A to
     diagnostics in run B.
 
-    The result is the relation as a list of triples (a, b, confidence) where
-    each element {a,b} is None or an element from the respective run, and
-    confidence is a measure of the match quality (where 0 indicates equality,
-    and None is used if either element is None).
+    The result is the relation as a list of triples (a, b) where
+    each element {a,b} is None or a matching element from the respective run
     """
 
     res = []
@@ -236,7 +234,7 @@
                     path_difference_data.append(
                         a.getPathLength() - b.getPathLength())
 
-            res.append((a, b, 0))
+            res.append((a, b))
         elif a.getIssueIdentifier() > b.getIssueIdentifier():
             eltsB.append(b)
             neqA.append(a)
@@ -253,9 +251,9 @@
     # in any way on the diagnostic format.
 
     for a in neqA:
-        res.append((a, None, None))
+        res.append((a, None))
     for b in neqB:
-        res.append((None, b, None))
+        res.append((None, b))
 
     if opts.relative_log_path_histogram or opts.relative_path_histogram or \
             opts.absolute_path_histogram:
@@ -281,9 +279,8 @@
     foundDiffs = 0
     totalAdded = 0
     totalRemoved = 0
-    totalChanged = 0
     for res in diff:
-        a, b, confidence = res
+        a, b = res
         if a is None:
             print "ADDED: %r" % b.getReadableName()
             foundDiffs += 1
@@ -298,26 +295,14 @@
             if auxLog:
                 print >>auxLog, ("('REMOVED', %r, %r)" % (a.getReadableName(),
                                                           a.getReport()))
-        elif confidence:
-            print "CHANGED: %r to %r" % (a.getReadableName(),
-                                         b.getReadableName())
-            foundDiffs += 1
-            totalChanged += 1
-            if auxLog:
-                print >>auxLog, ("('CHANGED', %r, %r, %r, %r)"
-                                 % (a.getReadableName(),
-                                    b.getReadableName(),
-                                    a.getReport(),
-                                    b.getReport()))
         else:
             pass
 
     TotalReports = len(resultsB.diagnostics)
     print "TOTAL REPORTS: %r" % TotalReports
     print "TOTAL DIFFERENCES: %r" % foundDiffs
     print "TOTAL ADDED: %r" % totalAdded
     print "TOTAL REMOVED: %r" % totalRemoved
-    print "TOTAL CHANGED: %r" % totalChanged
     if auxLog:
         print >>auxLog, "('TOTAL NEW REPORTS', %r)" % TotalReports
         print >>auxLog, "('TOTAL DIFFERENCES', %r)" % foundDiffs


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42819.132483.patch
Type: text/x-patch
Size: 2885 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180201/75fa3138/attachment.bin>


More information about the cfe-commits mailing list