More accurately compute the ranges of possible values for +, -, *, &, %.
authorRichard Smith <richard@metafoo.co.uk>
Tue, 11 Aug 2020 20:49:59 +0000 (13:49 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Tue, 1 Sep 2020 06:16:48 +0000 (23:16 -0700)
commitcff6dda604cb0548bef5e5951dd1e74536110588
tree48e804d7aee070797fe09fe652748ec3c103c2e1
parente7f53044e7263cdbbb4fed9abf086b88ba486bba
More accurately compute the ranges of possible values for +, -, *, &, %.

Continue to heuristically pick the wider of the two operands for
narrowing conversion warnings so that some_char + 1 isn't treated as
being wider than a char, but use the more accurate computation for
tautological comparison warnings.

Differential Revision: https://reviews.llvm.org/D85778
clang/lib/Sema/SemaChecking.cpp
clang/test/Sema/tautological-constant-compare.c