[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-28 Thread Valeriy Savchenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1f57d76a8dd0: [analyzer] Refactor range inference for symbolic expressions (authored by vsavchenko). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79232/new/

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-27 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 266571. vsavchenko added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79232/new/ https://reviews.llvm.org/D79232 Files: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedCons

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-18 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 264614. vsavchenko added a comment. Fix a problem with doubles sneaking into integer symbolic expressions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79232/new/ https://reviews.llvm.org/D79232 Files: c

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/Analysis/constant-folding.c:127-128 + if (a > 10) { +clang_analyzer_eval((a & 1) <= 1); // expected-warning{{FALSE}} +clang_analyzer_eval((a & 1

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-06 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko marked an inline comment as done. vsavchenko added inline comments. Comment at: clang/test/Analysis/constant-folding.c:127-128 + if (a > 10) { +clang_analyzer_eval((a & 1) <= 1); // expected-warning{{FALSE}} +clang_analyzer_eval((a & 1) > 1); // expected-warn

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:340-345 +// TODO #2: We didn't go into the nested expressions before, so it +// might cause us spending much more time doing the inference. +// This can be a problem for de

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-05 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko marked an inline comment as done. vsavchenko added inline comments. Comment at: clang/test/Analysis/constant-folding.c:127-128 + if (a > 10) { +clang_analyzer_eval((a & 1) <= 1); // expected-warning{{FALSE}} +clang_analyzer_eval((a & 1) > 1); // expected-warn

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/constant-folding.c:127-128 + if (a > 10) { +clang_analyzer_eval((a & 1) <= 1); // expected-warning{{FALSE}} +clang_analyzer_eval((a & 1) > 1); // expected-warning{{FALSE}} + } vsavchenko wrote:

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-05 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko marked an inline comment as done. vsavchenko added inline comments. Comment at: clang/test/Analysis/constant-folding.c:127-128 + if (a > 10) { +clang_analyzer_eval((a & 1) <= 1); // expected-warning{{FALSE}} +clang_analyzer_eval((a & 1) > 1); // expected-warn

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-05 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 262170. vsavchenko added a comment. Add clarification on infeasible ranges in bitwise tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79232/new/ https://reviews.llvm.org/D79232 Files: clang/include/c

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:385 + + RangeSet VisitAndOperator(RangeSet LHS, RangeSet RHS, QualType T) { +// TODO: generalize for the ranged RHS. I always get surprised when I read code

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:340-345 +// TODO #2: We didn't go into the nested expressions before, so it +// might cause us spending much more time doing the inference. +// This can be a problem

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/constant-folding.c:127-128 + if (a > 10) { +clang_analyzer_eval((a & 1) <= 1); // expected-warning{{FALSE}} +clang_analyzer_eval((a & 1) > 1); // expected-warning{{FALSE}} + } How can both of t

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-04 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 261833. vsavchenko marked an inline comment as done. vsavchenko added a comment. Now `getRange` is more likely to return unfeasible range. Calling `Intersect` and `pin` methods from such ranges might cause a crash. Check for unfeasible ranges. Repositor

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:340-345 +// TODO #2: We didn't go into the nested expressions before, so it +// might cause us spending much more time doing the inference. +// This can be a problem for de

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-02 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D79232#2016065 , @NoQ wrote: > @baloghadamsoftware @steakhal @ASDenysPetrov will you be able to plug D49074 > /D50256 > /D77792 >

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-02 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko marked 3 inline comments as done. vsavchenko added a comment. > Very nice, i like this architecture. Aww, thanks 😊 > @baloghadamsoftware @steakhal @ASDenysPetrov will you be able to plug D49074 > /D50256 > /D77792 >

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a subscriber: steakhal. NoQ added a comment. Very nice, i like this architecture. @baloghadamsoftware @steakhal @ASDenysPetrov will you be able to plug D49074 /D50256 /D77792 /D77802 <

[PATCH] D79232: [analyzer] Refactor range inference for symbolic expressions

2020-05-01 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko created this revision. vsavchenko added reviewers: NoQ, dcoughlin. Herald added subscribers: cfe-commits, ASDenysPetrov, martong, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang. This change intr