[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-05-25 Thread Denys Petrov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGba92b274225f: [analyzer] Improved RangeSet::Negate support of unsigned ranges (authored by ASDenysPetrov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7780

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-05-21 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @NoQ many thanks. I'll land it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77802/new/ https://reviews.llvm.org/D77802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-05-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. @NoQ @ASDenysPetrov I will rebase my changes - no worries :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77802/new/ https://reviews.llvm.org/D77802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-05-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a subscriber: vsavchenko. NoQ added a comment. This revision is now accepted and ready to land. Looks fantastic, thanks! I guess let's race with @vsavchenko on whoever commits first :p CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77802/new/ https:

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-05-20 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. Just a ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77802/new/ https://reviews.llvm.org/D77802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-05-12 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @NoQ , ping. Look please. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77802/new/ https://reviews.llvm.org/D77802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-05-04 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 261784. ASDenysPetrov added a comment. @NoQ updated the patch. Review, please. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77802/new/ https://reviews.llvm.org/D77802 Files: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp clang/

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-05-04 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov marked 4 inline comments as done. ASDenysPetrov added a comment. Thank you for the feedback. I'll update the patch soon. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:261-262 +// remove adjacent ranges +newRanges = F.remove(newRanges

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-05-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. The math looks correct, thank you for fixing the crash and adding support for more cases! Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:261-262 +// remove adjacent ranges +newRanges = F.remove(newRanges, *iter1); +newRang

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-04-28 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 260604. ASDenysPetrov edited the summary of this revision. ASDenysPetrov added a comment. @baloghadamsoftware I have added regression tests as you asked. You can now check them. Thanks. @NoQ, I kindly ask you to look at the changes, seems that it has a

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-04-22 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov marked an inline comment as done. ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:217 + + const llvm::APSInt sampleValue = getMinValue(); + const bool isUnsigned = sampleValue.isUnsigned();

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-04-17 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 258300. ASDenysPetrov added a comment. Refined Negate function. Divided by steps for clarity. Made some changes in comments due to guideline. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77802/new/ https://reviews.llvm.org/D77802 Files: cl

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-04-17 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov marked 9 inline comments as done. ASDenysPetrov added a comment. @baloghadamsoftware > However, please still extend the current tests I've looked for some appropriate tests to extend, but haven't found. What would you advise to use instead of mine? @steakhal Thanks for the comment

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-04-16 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. I'm impressed. Though, I had some nits, please don't take it to heart :) And consider joining the to the pre-merge beta testing project to benefit from buildbots and much more - for free. Comment at: clang/

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-04-16 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. The unit test you added is very welcome. However, please still extend the current tests (which are for the signed) also for the unsigned as well. Since this is a core change in the analyzer, let us wait for @NoQ as well before accepting it. CHANGES SINCE LA

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-04-16 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @baloghadamsoftware Please, review my changes. If you think they are OK, could you, please, commit the patch on by behalf as an author: `git commit --amend --author="Denys Petrov "` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77802/new/ https://reviews.

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-04-15 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 257617. ASDenysPetrov edited the summary of this revision. ASDenysPetrov added a comment. Herald added a subscriber: mgorny. Improved Negate function in terms of handling `[MIN,A]U[B,MAX] => [MIN,-B]U[-A,MAX]` (previously was `[MIN,MIN]U[MIN+1,-B]U[-A,M

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-04-14 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @steakhal, thank you for your time! @baloghadamsoftware > Please add a bit more tests where we can see that the negated of unsigned > range of `[n..m]` is `UINT_MAX-m+1..UINT_MAX-n+1]`. Yes. I am writing them. Thanks for the review. Repository: rG LLVM Github

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-04-14 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Thank you for fixing this issue! Please add a bit more tests where we can see that the negated of unsigned range of `[n..m]` is `UINT_MAX-m+1..UINT_MAX-n+1]`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77802/

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-04-10 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. It took me some time to understand what you were doing. Probably a bit ASCII-art would have had help (eg. about the wrapping behavior). By the same token, I wouldn't mind more tests, especially exercising the implemented behavior. Probably `unit-tests` would fit better

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-04-09 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: NoQ, baloghadamsoftware. ASDenysPetrov added a project: clang. Herald added subscribers: cfe-commits, martong, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, xazax.hun. This fixes https://b