summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMikhail R. Gadelha <mikhail.ramalho@gmail.com>2018-05-30 11:17:55 +0000
committerMikhail R. Gadelha <mikhail.ramalho@gmail.com>2018-05-30 11:17:55 +0000
commit3d25876adf4f9f8f1aff71ec00fe4419054b7439 (patch)
tree6385209e618b5001d08dd83c82bec8f0a723eb93 /utils
parent86f879c238229ae1d58ce3e605b8eee2e513d660 (diff)
downloadclang-3d25876adf4f9f8f1aff71ec00fe4419054b7439.tar.gz
Fix a (possible) division by zero check in the CmpRuns script
I missed updating the check in r333375 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@333529 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rwxr-xr-xutils/analyzer/CmpRuns.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/analyzer/CmpRuns.py b/utils/analyzer/CmpRuns.py
index 17d50ab659..1b8fe7bd69 100755
--- a/utils/analyzer/CmpRuns.py
+++ b/utils/analyzer/CmpRuns.py
@@ -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