commit | e00afc5bd6f874f0d34f6e6297eb2055570ffb95 | [log] [tgz] |
---|---|---|
author | Gabor Marton <gabor.marton@ericsson.com> | Thu Mar 25 15:29:41 2021 +0100 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Mar 25 13:21:24 2021 -0700 |
tree | 56a352049113a6a9b34460c1ce95bf89197173cd | |
parent | 1c39dac6933cce1b9ea11e1f5060c272b61aee65 [diff] |
[Analyzer] Infer 0 value when the divisible is 0 (bug fix) Currently, we infer 0 if the divisible of the modulo op is 0: int a = x < 0; // a can be 0 int b = a % y; // b is either 1 % sym or 0 However, we don't when the op is / : int a = x < 0; // a can be 0 int b = a / y; // b is either 1 / sym or 0 / sym This commit fixes the discrepancy. Differential Revision: https://reviews.llvm.org/D99343 GitOrigin-RevId: 015c39882ebc1771713a7523ae76903ebae83288