]> granicus.if.org Git - clang/commitdiff
Fix a (possible) division by zero check in the CmpRuns script
authorMikhail R. Gadelha <mikhail.ramalho@gmail.com>
Wed, 30 May 2018 11:17:55 +0000 (11:17 +0000)
committerMikhail R. Gadelha <mikhail.ramalho@gmail.com>
Wed, 30 May 2018 11:17:55 +0000 (11:17 +0000)
I missed updating the check in r333375

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@333529 91177308-0d34-0410-b5e6-96231b3b80d8

utils/analyzer/CmpRuns.py

index 17d50ab65930c3072a6f1f12afb3d03005ff075f..1b8fe7bd698dd0d0e540d49caf3dcd4f3e9949a9 100755 (executable)
@@ -311,7 +311,7 @@ def compareStats(resultsA, resultsB):
             report = "%.3f -> %.3f" % (valA, valB)
             # Only apply highlighting when writing to TTY and it's not Windows
             if sys.stdout.isatty() and os.name != 'nt':
-                if valA != 0:
+                if valB != 0:
                   ratio = (valB - valA) / valB
                   if ratio < -0.2:
                       report = Colors.GREEN + report + Colors.CLEAR