[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2023-01-24 Thread Manas Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5f02ad880e42: [analyzer][solver] Improve reasoning for not equal to operator (authored by manas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140086/new/

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2023-01-24 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. Looks good. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140086/new/ https://reviews.llvm.org/D140086

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2023-01-24 Thread Manas Gupta via Phabricator via cfe-commits
manas added a comment. Gentle ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140086/new/ https://reviews.llvm.org/D140086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2023-01-09 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Sorry, I don't have the time this week. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140086/new/ https://reviews.llvm.org/D140086 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2023-01-04 Thread Manas Gupta via Phabricator via cfe-commits
manas marked 5 inline comments as done. manas added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1638-1639 + if (LHS.isUnsigned() && (LHS.getBitWidth() >= RHS.getBitWidth())) { +if (RHS.getMaxValue().isNegative() || +

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2023-01-04 Thread Manas Gupta via Phabricator via cfe-commits
manas updated this revision to Diff 486425. manas added a comment. Re-introduce bitwidth comparison Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140086/new/ https://reviews.llvm.org/D140086 Files: clang/lib/StaticAnalyzer/Core/RangeConstraintMa

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2023-01-04 Thread Manas Gupta via Phabricator via cfe-commits
manas added a comment. In D140086#4010175 , @steakhal wrote: >> This test fails. >> >> void testfoo(unsigned char u, signed int s) { >> if (u >= 253 && u <= 255 && s < INT_MAX - 2) { >> // u: [253, 254], s: [INT_MIN, INT_MAX - 2] >> clan

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2022-12-21 Thread Balázs Benics via Phabricator via cfe-commits
steakhal requested changes to this revision. steakhal added a comment. This revision now requires changes to proceed. >>> Bitwidth was important because we should ideally cast smaller bitwidth type >>> to bigger bitwidth type. >>> Consider if we have LHS(u8), RHS(i32), then without checking for b

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2022-12-18 Thread Manas Gupta via Phabricator via cfe-commits
manas added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1642 +if (LHS.isUnsigned() ^ RHS.isUnsigned()) { + if (LHS.isUnsigned() && (LHS.getBitWidth() >= RHS.getBitWidth())) { + steakhal wrote: > manas wrote: > >

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2022-12-17 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. About spellings. In the summary you used 'lesser', I think as a synonym for 'smaller' or something like that. Anyway, not important. Great stuff. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1642 +if (LHS.isUnsigned() != RH

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2022-12-17 Thread Manas Gupta via Phabricator via cfe-commits
manas updated this revision to Diff 483786. manas added a comment. Remove redundant branches Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140086/new/ https://reviews.llvm.org/D140086 Files: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.c

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2022-12-17 Thread Manas Gupta via Phabricator via cfe-commits
manas marked 2 inline comments as done. manas added a comment. In D140086#3998426 , @steakhal wrote: > Thanks for going the extra mile to address this last thing. I really > appreciate it. > I've got only a few minor comments and suggestions. > > I'd rec

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2022-12-15 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Thanks for going the extra mile to address this last thing. I really appreciate it. I've got only a few minor comments and suggestions. I'd recommend spell-checking the comments and the summary of this revision. See my technical comments inline. The test coverage looks

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2022-12-15 Thread Manas Gupta via Phabricator via cfe-commits
manas updated this revision to Diff 483135. manas added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140086/new/ https://reviews.llvm.org/D140086 Files: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp clang/test/Ana

[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator

2022-12-14 Thread Manas Gupta via Phabricator via cfe-commits
manas created this revision. manas added a reviewer: steakhal. Herald added subscribers: ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. manas requested review of th