[PATCH] D110913: [analyzer][solver] Handle simplification to ConcreteInt

2021-10-14 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGac3edc5af099: [analyzer][solver] Handle simplification to ConcreteInt (authored by martong). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110913/new/

[PATCH] D110913: [analyzer][solver] Handle simplification to ConcreteInt

2021-10-14 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. This revision is now accepted and ready to land. I love this! The coverage is great and looks good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110913/new/

[PATCH] D110913: [analyzer][solver] Handle simplification to ConcreteInt

2021-10-13 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:392-397 +/// Try to simplify a given symbolic expression based on the constraints in +/// State. This is needed because the Environment bindings are not

[PATCH] D110913: [analyzer][solver] Handle simplification to ConcreteInt

2021-10-13 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 379434. martong marked 5 inline comments as done. martong added a comment. - Use getAsSymbol to initialize the simplified member symbol - Add some more explanation to ento::simplify - Add a comment about checking only feasiblity - Add a new test case for the

[PATCH] D110913: [analyzer][solver] Handle simplification to ConcreteInt

2021-10-12 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Looks good to me. I very much like this. Check my nits inline. Given those are fixed I'm gonna accept this. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:392-397 +/// Try to simplify a given symbolic

[PATCH] D110913: [analyzer][solver] Handle simplification to ConcreteInt

2021-10-12 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/test/Analysis/solver-sym-simplification-concreteint.c:22 + // c == 0 --> 0 + 1 == 0 contradiction + clang_analyzer_eval(c == 0);// expected-warning{{FALSE}} + martong wrote: > steakhal wrote: > > Could we

[PATCH] D110913: [analyzer][solver] Handle simplification to ConcreteInt

2021-10-12 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 378994. martong marked an inline comment as done. martong added a comment. - Make the test case way simpler (and independent from other solver patches) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110913/new/

[PATCH] D110913: [analyzer][solver] Handle simplification to ConcreteInt

2021-10-12 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:2104 + const llvm::APSInt = CI->getValue(); + const RangeSet *ClassConstraint = getConstraint(State, Class); + // We have

[PATCH] D110913: [analyzer][solver] Handle simplification to ConcreteInt

2021-10-08 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:2099-2111 + +SymbolRef SimplifiedMemberSym = nullptr; +SVal SimplifiedMemberVal = simplifyToSVal(State, MemberSym); +if (const auto CI =

[PATCH] D110913: [analyzer][solver] Handle simplification to ConcreteInt

2021-10-08 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:2104 + const llvm::APSInt = CI->getValue(); + const RangeSet *ClassConstraint = getConstraint(State, Class); + // We have found a contradiction.

[PATCH] D110913: [analyzer][solver] Handle simplification to ConcreteInt

2021-10-06 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:390-396 /// Try to simplify a given symbolic expression's associated value based on the /// constraints in State. This is needed because the Environment

[PATCH] D110913: [analyzer][solver] Handle simplification to ConcreteInt

2021-10-06 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 377495. martong marked 2 inline comments as done. martong added a comment. - Add better comments to `simplify` functions - Add a new check and explanation to the test file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D110913: [analyzer][solver] Handle simplification to ConcreteInt

2021-10-01 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. The patch seems reasonable, but I will need slightly more time to digest it. I'll get back to this. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:390-396 /// Try to simplify a given symbolic expression's

[PATCH] D110913: [analyzer][solver] Handle simplification to ConcreteInt

2021-10-01 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: steakhal, ASDenysPetrov, manas, NoQ, vsavchenko. Herald added subscribers: gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun, whisperity. Herald added a reviewer: