[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-09-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:103-110 + enum class CompareResult { +unknown, +identical, +less, +less_equal, +greater, +greater_equal baloghadamsoft

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-09-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. Hi @baloghadamsoftware Great job! I also wanted to support more operations for range-based logic. However, I don't think that this is the right place to make this kind of assumptions. A couple months ago, I added the `SymbolicRangeInferrer` component to aggregate

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-09-21 Thread Gabor Marton via Phabricator via cfe-commits
martong added a reviewer: vsavchenko. martong added a comment. Adding Valeriy as a reviewer. He's been working with the solver recently, so his insights might be really useful here. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77792/new/ https://reviews.llvm.org/D77792 __

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-09-21 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 293111. baloghadamsoftware added a comment. Tests updated: some execution paths merged by refactoring assertions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77792/new/ https://reviews.llvm.org/D77792 Files: clang/include/clang/Stat

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-09-18 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:103-110 + enum class CompareResult { +unknown, +identical, +less, +less_equal, +greater, +greater_equal

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-09-18 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:814 +Optional RangeConstraintManager::tryAssumeSymSymOp( +ProgramStateRef State, BinaryOperator::Opcode Op, SymbolRef LHSSym, NoQ wrote: > I belie

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-09-18 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 292755. baloghadamsoftware added a comment. Crash fixed and new tests added. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77792/new/ https://reviews.llvm.org/D77792 Files: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedC

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-09-18 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware commandeered this revision. baloghadamsoftware edited reviewers, added: steakhal; removed: baloghadamsoftware. baloghadamsoftware added a comment. Herald added a subscriber: gamesh411. We found use cases which can be solved using this improvement. That is why I commandeer this

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-08-18 Thread Balázs Benics via Phabricator via cfe-commits
steakhal abandoned this revision. steakhal added a comment. I no longer think that we should support Symbol to Symbol comparisons. It would introduce certain anomalies, like //Why could the CM reason about this and that comparisons wile could not in others//. As of now, it's clear that we can no

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-05-05 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:103-110 + enum class CompareResult { +unknown, +identical, +less, +less_equal, +greater, +greater_equal Can

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-05-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:814 +Optional RangeConstraintManager::tryAssumeSymSymOp( +ProgramStateRef State, BinaryOperator::Opcode Op, SymbolRef LHSSym, I believe you don't need to return

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-04-28 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @steakhal What about unsigneds? Does it work for unsigned values as well? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77792/new/ https://reviews.llvm.org/D77792 ___ cfe-commits mailing list cfe-commits@list

Re: [PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-04-28 Thread Denis Petrov via cfe-commits
; daniel.kr...@ericsson.com; martongab...@gmail.com; Denis Petrov; cfe-commits@lists.llvm.org; mlek...@skidmore.edu; blitzrak...@gmail.com; shen...@google.com; 1.in...@gmail.com Тема: [PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs CAUTION: This email

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-04-10 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 256551. steakhal added a comment. - rewritten the `RangeSet::compare` function and checked the assumptions on WolframAlpha - moved the `RangeSet::compare` function to a cpp file - added comments to the `RangeSet::compare` function - fixed the comment in `Ran

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-04-09 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D77792#1971921 , @Szelethus wrote: > You seem to have forgotten `-U` :^) Nice catch! Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:774 +Optional RangeConstraintManager::tryAssu

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-04-09 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 256420. steakhal marked 4 inline comments as done. steakhal added a comment. - add full diff context - NFC refactored `RangeSet` comparison function - add tests for compund `RangeSet`s like: `{[0,1],[5,6]} < {[9,9],[11,42],[44,44]}` - NFC clang-format test f

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-04-09 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. I like it, nice work! Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:774 +Optional RangeConstraintManager::tryAssumeSymSymOp( +ProgramStateRef State, BinaryOperator::Opcode Op, SymbolRef LHSSym, Is it possibl

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-04-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. You seem to have forgotten `-U` :^) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77792/new/ https://reviews.llvm.org/D77792 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-04-09 Thread Balázs Benics via Phabricator via cfe-commits
steakhal created this revision. steakhal added reviewers: NoQ, baloghadamsoftware, Charusso, Szelethus. Herald added subscribers: cfe-commits, ASDenysPetrov, martong, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, xazax.hun, whisperity. Herald added a project: clang. This patch