[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] D78933: [analyzer] RangeConstraintManager optimizations in comparison expressions

2020-05-06 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:629-630 + auto &One = BV.getValue(1, T); + const RangeSet TrueRangeSet(F, One, One); + const RangeSet FalseRangeSet(F, Zero

[PATCH] D78933: [analyzer] RangeConstraintManager optimizations in comparison expressions

2020-05-06 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. Guys, @xazax.hun, @Charusso, @steakhal, @vsavchenko, @NoQ, @baloghadamsoftware, please, tell something. What do you think of this improvement? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78933/new/ https://reviews.llvm.org/D78933 _

[PATCH] D78289: [analyzer] Stability improvements for IteratorModeling functions

2020-05-06 Thread Denys Petrov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGba8cda989cf8: [analyzer] Stability improvement for IteratorModeling (authored by ASDenysPetrov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78289/new/ ht

[PATCH] D78933: [analyzer] RangeConstraintManager optimizations in comparison expressions

2020-05-06 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov marked 5 inline comments as done. ASDenysPetrov added a comment. @xazax.hun, many thanks for looking at the patch. > Did you do some measurements on some projects how the run-time changes? I have never run them before. How I can do this? What project to use as a sample? > [1]: ht

[PATCH] D78933: [analyzer] RangeConstraintManager optimizations in comparison expressions

2020-05-06 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov marked 3 inline comments as done. ASDenysPetrov added a comment. > You can either add -analyzer-stats to your cc1 invocation It helps, thanks. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:588 + // AnyX2 means that two expressions marked a

[PATCH] D78933: [analyzer] RangeConstraintManager optimizations in comparison expressions

2020-05-07 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:588 + // AnyX2 means that two expressions marked as `Any` are met in code, + // and there is a special column for that, for

[PATCH] D78933: [analyzer] RangeConstraintManager optimizations in comparison expressions

2020-05-07 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 262667. ASDenysPetrov edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78933/new/ https://reviews.llvm.org/D78933 Files: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp clang/test/Analysis/constrai

[PATCH] D78933: [analyzer] RangeConstraintManager optimizations in comparison expressions

2020-05-07 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov marked an inline comment as done. ASDenysPetrov added a comment. Updated the patch due to comments of @xazax.hun Comment at: clang/test/Analysis/constraint_manager_conditions.cpp:184 +} \ No newline at end of file xazax.hun wrote: > Nit: please a

[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] D78933: [analyzer] RangeConstraintManager optimizations in comparison expressions

2020-05-12 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov marked 3 inline comments as done. ASDenysPetrov added a comment. > The measurements I mentioned earlier about runtimes, node count and so on > could help answer some of those questions. I'm looking for an appropriate project to measure performance, since I have some troubles runni

[PATCH] D78933: [analyzer] RangeConstraintManager optimizations in comparison expressions

2020-05-13 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 263689. ASDenysPetrov added a comment. Updated due to @xazax.hun comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78933/new/ https://reviews.llvm.org/D78933 Files: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp clang/test

[PATCH] D78933: [analyzer] RangeConstraintManager optimizations in comparison expressions

2020-05-13 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 263739. ASDenysPetrov added a comment. Updated. @xazax.hun you were right. Now it looks more readable. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78933/new/ https://reviews.llvm.org/D78933 Files: clang/lib/StaticAnalyzer/Core/Ra

[PATCH] D112621: [analyzer][solver] Introduce reasoning for not equal to operator

2022-08-29 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @manas Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112621/new/ https://reviews.llvm.org/D112621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D103096: [analyzer] Implement cast for ranges of symbolic integers

2022-06-27 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov marked 4 inline comments as done. ASDenysPetrov added a comment. @martong Just FYI. I've been working on reworking this solution to using `EquivalenceClasses` for several weeks. It turned out that this is an extremely hard task to acomplish. There a lot of cast cases like: `(int8)x

[PATCH] D129152: [Clang][unittests] Silence trucation warning with MSVC

2022-07-05 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov accepted this revision. ASDenysPetrov added a comment. This revision is now accepted and ready to land. @aganea Thank you for fixing this. `TestValues` structure impies to hold a set of values which can do some kind of convertions including truncations. This is what tests are about.

[PATCH] D103094: [analyzer] Implemented RangeSet::Factory::castTo function to perform promotions, truncations and conversions

2022-03-23 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. Herald added a project: All. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103094/new/ https://reviews.llvm.org/D103094 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[PATCH] D103096: [analyzer] Implement cast for ranges of symbolic integers

2022-03-23 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. Herald added a project: All. Ping. If there is somebody interested in this? :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103096/new/ https://reviews.llvm.org/D103096 ___ cfe-commits mailing list cfe-commits@

[PATCH] D130372: [analyzer] Add a new factory function RangeSet::Factory::invert

2022-07-27 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov marked 6 inline comments as done. ASDenysPetrov added a comment. @martong Thanks for review. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:728-729 + ContainerType Result; + Result.reserve(What.size() + 1 - bool(What.getMinValue() != MIN) -

[PATCH] D130372: [analyzer] Add a new factory function RangeSet::Factory::invert

2022-07-27 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov marked 3 inline comments as done. ASDenysPetrov added a comment. Now I'm working on the next patch and you'll see a motivation soon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130372/new/ https://reviews.llvm.org/D130372 _

[PATCH] D130372: [analyzer] Add a new factory function RangeSet::Factory::invert

2022-07-27 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 448161. ASDenysPetrov added a comment. Make changes according to the remarks. - Add complexity to function description. - Rewrite the loop making it deterministic. - Add back invert operation to the tests. CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D131006: [analyzer] Use DisequalityMap while inferring constraints

2022-08-02 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: martong, steakhal, NoQ. ASDenysPetrov added a project: clang. Herald added subscribers: manas, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun. Herald added a project: All

[PATCH] D130372: [analyzer] Add a new factory function RangeSet::Factory::invert

2022-08-02 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @martong > Now I'm working on the next patch and you'll see a motivation soon. Here is the motivation but it still causes some tests failure D131006 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130372/new/ https://re

[PATCH] D130372: [analyzer] Add a new factory function RangeSet::Factory::invert

2022-08-03 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/unittests/StaticAnalyzer/RangeSetTest.cpp:1130 + // Check inverting single range. + this->checkInvert({{MIN, MAX}}, {}); + this->checkInvert({{MIN, MID}}, {{MID + 1, MAX}}); martong wrote: > ASDenysPetrov

[PATCH] D131006: [analyzer] Use DisequalityMap while inferring constraints

2022-08-04 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D131006#3699017 , @martong wrote: > Awesome! Thank you! Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1512-1516 +if (IsFirst) { + IsFirst = false; + RS

[PATCH] D130372: [analyzer] Add a new factory function RangeSet::Factory::invert

2022-08-05 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D130372#3699036 , @martong wrote: > LGTM! Nice work! Thank you. I prefer to load this along with the motivation part D131006 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13

[PATCH] D131006: [analyzer] Use DisequalityMap while inferring constraints

2022-08-09 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @martong This solution has an essential logical mistake. It relies on the erroneous assumption that if `x > 0 && x != y` then `y` is in range `[MIN, 0]` but that's **not** true. `x` and `y` could be `1` and `2` respectively. My idea will only work with concrete in

[PATCH] D130372: [analyzer] Add a new factory function RangeSet::Factory::invert

2022-08-09 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. The //motivation //for this revision is lost due to the logical mistake in the later. However, this revision could be used for other improvements in the future. I will not merge it until new //motivation //has become. CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D131514: [analyzer] {NFC} Add more test cases for equality tracking

2022-08-09 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: martong, steakhal, NoQ. ASDenysPetrov added a project: clang. Herald added subscribers: manas, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun. Herald added a project: All

[PATCH] D131514: [analyzer] [NFC] Add more test cases for equality tracking

2022-08-10 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 451527. ASDenysPetrov added a comment. C-standard does not support templates. Replaced function template with the function. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131514/new/ https://reviews.llvm.org/D131514 Files: clang/test/Analys

[PATCH] D131514: [analyzer] [NFC] Add more test cases for equality tracking

2022-08-10 Thread Denys Petrov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7e2b995e0cce: [analyzer] [NFC] Add more test cases for equality tracking (authored by ASDenysPetrov). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D103096: [analyzer] Implement cast for ranges of symbolic integers.

2021-07-15 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @vsavchenko > It is already a pattern in other type hierarchies. I just rarely met them. And it was hard to me reading the code searching for implementation all over the places. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive

[PATCH] D103096: [analyzer] Implement cast for ranges of symbolic integers.

2021-07-15 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 359007. ASDenysPetrov edited the summary of this revision. ASDenysPetrov added a comment. Improved `ignoreCasts` implementation. Adapted to `ConstraintAssignor`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103096/new/ https://reviews.llvm.or

[PATCH] D103096: [analyzer] Implement cast for ranges of symbolic integers.

2021-07-15 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1908-1912 +// Handle SymbolCast before actual assignment. +std::tie(Sym, NewConstraint) = +modifySymbolAndConstraints(Sym, NewConstraint); +if (!State) +

[PATCH] D103096: [analyzer] Implement cast for ranges of symbolic integers.

2021-07-16 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 359305. ASDenysPetrov added a comment. Adapted solution to ConstraintAssignor API. Added tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103096/new/ https://reviews.llvm.org/D103096 Files: clang/include/clang/StaticAnalyzer/Checkers/SV

[PATCH] D103096: [analyzer] Implement cast for ranges of symbolic integers.

2021-07-16 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1908-1912 +// Handle SymbolCast before actual assignment. +std::tie(Sym, NewConstraint) = +modifySymbolAndConstraints(Sym, NewConstraint); +if (!State) +

[PATCH] D106152: [analyzer] Remove test file as duplicated.

2021-07-16 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added a reviewer: NoQ. ASDenysPetrov added a project: clang. Herald added subscribers: manas, steakhal, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. ASDenysPetrov requested review of this revisi

[PATCH] D106152: [analyzer] Remove test file as duplicated.

2021-07-19 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D106152#2885091 , @NoQ wrote: > I have no opinion here. There's nothing wrong with having more tests and they > don't look like exact duplicates of each other(?) In D106152#2885091

[PATCH] D106152: [analyzer] Move test case to existing test file and remove duplicated test file.

2021-07-19 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 359710. ASDenysPetrov retitled this revision from "[analyzer] Remove test file as duplicated." to "[analyzer] Move test case to existing test file and remove duplicated test file.". ASDenysPetrov edited the summary of this revision. ASDenysPetrov added

[PATCH] D104285: [analyzer] Retrieve value by direct index from list initialization of constant array declaration.

2021-07-19 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 359768. ASDenysPetrov added a comment. Fixed a case mentioned by @chrish_ericsson_atx. Added the cases to the common bunch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104285/new/ https://reviews.llvm.org/D104285 Files: clang/include/cla

[PATCH] D104285: [analyzer] Retrieve value by direct index from list initialization of constant array declaration.

2021-07-19 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @chrish_ericsson_atx OK. I think I found the issue. Could you please check whether it works for you? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104285/new/ https://reviews.llvm.org/D104285 ___ cfe-commits mai

[PATCH] D104285: [analyzer] Retrieve value by direct index from list initialization of constant array declaration.

2021-07-19 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 359797. ASDenysPetrov added a comment. Fixed concern about index type being either ` int64_t` or `uint64_t`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104285/new/ https://reviews.llvm.org/D104285 Files: clang/include/clang/AST/Expr.h

[PATCH] D92928: [analyzer] Highlight arrows for currently selected event

2021-07-20 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. I've made some debugging with IE. Let's keep the diagnostics IE friendly. We might not know how many users work with IE in real. Comment at: clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp:1275-1283 var scrollTo = function(el) { querySele

[PATCH] D92928: [analyzer] Highlight arrows for currently selected event

2021-07-20 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. P.S. Sorry. My prev comments get dimmed, since I've playing with history commints, but they still are relevant. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92928/new/ https://reviews.llvm.org/D92928 __

[PATCH] D92928: [analyzer] Highlight arrows for currently selected event

2021-07-20 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D92928#2890448 , @vsavchenko wrote: > IE doesn't seem to support anything. And the majority of developers (on > Linux and on MacOS) have literally no way to test it. What we gain from > supporting IE for non-existing u

[PATCH] D92928: [analyzer] Highlight arrows for currently selected event

2021-07-20 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. Or, we can find another symbiotic way. You can make changes the way without painfull part of thinking about IE. And I will prepare the next patch adjusting it. Thus, revisions would be smaller. That's would be easier for you to test all the things before the load.

[PATCH] D106681: [analyzer] Retrieve a value from list initialization of constant multi-dimensional array.

2021-07-23 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: NoQ, xazax.hun, r.stahl, chrish_ericsson_atx. ASDenysPetrov added a project: clang. Herald added subscribers: manas, steakhal, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftwar

[PATCH] D106739: [analyzer] Add option to SATest.py for extra checkers

2021-07-27 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @RedDocMD Could you, please, explain the motivation and add at least one test to verify it works. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106739/new/ https://reviews.llvm.org/D106739 __

[PATCH] D107073: [analyzer] Disable direct binding from list initialization for constant arrays of local storage duration.

2021-07-29 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: NoQ, vsavchenko, steakhal, xazax.hun. ASDenysPetrov added a project: clang. Herald added subscribers: manas, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. ASDenysPetrov r

[PATCH] D92928: [analyzer] Highlight arrows for currently selected event

2021-07-29 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov accepted this revision. ASDenysPetrov added a comment. This revision is now accepted and ready to land. Let's load this patch and I will prepare the adjustment for IE in pursuit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92928/new/

[PATCH] D104285: [analyzer][AST] Retrieve value by direct index from list initialization of constant array declaration.

2021-07-29 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @martong I've added new reviewers, thanks for the prompt. > E.g. could we have a free function outside of the `InitListExpr` to implement > `getExprForConstArrayByRawIndex` It is possible, but I think this is more naturaly for the instance of `InitListExpr` to be

[PATCH] D112621: [analyzer][solver] Introduce reasoning for not equal to operator

2022-04-07 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. Here are my remarks. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1415-1416 + + Range CoarseLHS = fillGaps(LHS); + Range CoarseRHS = fillGaps(RHS); + Avoid filling the gaps, because it's completely possib

[PATCH] D107636: [analyzer][solver] Compute adjustment for unsupported symbols as well

2022-04-11 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. Herald added a project: All. I checked the tests file on the latest sources. It passes even without your changes. Maybe this patch is already outdated. Comment at: clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp:82-86 if (IsExpec

[PATCH] D122243: [analyzer][NFC] Introduce the checker package separator character

2022-04-11 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov accepted this revision. ASDenysPetrov added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122243/new/ https://reviews.llvm.org/D122243 ___ cfe-commits mailing list cfe-commi

[PATCH] D121387: [analyzer] ClangSA should tablegen doc urls refering to the main doc page

2022-04-12 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov accepted this revision. ASDenysPetrov added a comment. Thanks! LGTM. Comment at: clang/utils/TableGen/ClangSACheckersEmitter.cpp:87-90 + std::string CheckerFullName = StringRef(getCheckerFullName(&R, "-")).lower(); + return (llvm::Twine("https://clang.llvm.org/d

[PATCH] D103094: [analyzer] Implemented RangeSet::Factory::castTo function to perform promotions, truncations and conversions

2022-04-15 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:358 + assert(!isEmpty()); + return begin()->From().isUnsigned(); +} martong wrote: > Probably it is unrelated to this patch, but > Could it happen that `(+

[PATCH] D103094: [analyzer] Implemented RangeSet::Factory::castTo function to perform promotions, truncations and conversions

2022-04-15 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 423080. ASDenysPetrov added a comment. Updated according to suggestions. @martong thank you for the review. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103094/new/ https://reviews.llvm.org/D103094 Files: clang/include/clang/StaticAnalyzer

[PATCH] D103094: [analyzer] Implemented RangeSet::Factory::castTo function to perform promotions, truncations and conversions

2022-04-19 Thread Denys Petrov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe37726beb22a: [analyzer] Implemented RangeSet::Factory::castTo function to perform promotions… (authored by ASDenysPetrov). Changed prior to commit

[PATCH] D103094: [analyzer] Implemented RangeSet::Factory::castTo function to perform promotions, truncations and conversions

2022-04-19 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 423813. ASDenysPetrov added a comment. Loaded with comment updateds according to the remarks. @martong thank you for your time for the review! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103094/new/ https://reviews.llvm.org/D103094 Files:

[PATCH] D103096: [analyzer] Implement cast for ranges of symbolic integers

2022-04-22 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov marked 10 inline comments as done. ASDenysPetrov added a comment. Thank you for the review @martong! Your work is not less harder then mine. I'll rework and update the revision ASAP. Comment at: clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp:421-426

[PATCH] D103096: [analyzer] Implement cast for ranges of symbolic integers

2022-04-26 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 425248. ASDenysPetrov marked 4 inline comments as done. ASDenysPetrov edited the summary of this revision. ASDenysPetrov added a comment. @martong thank you for the idea. I've tried to implement it. Could you look at the patch once again, please? CHAN

[PATCH] D103096: [analyzer] Implement cast for ranges of symbolic integers

2022-07-11 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov marked 10 inline comments as done. ASDenysPetrov added a comment. @martong Thank you for your patience. I started moving to a bit another direction that we can improving it iteratively. Just spoiling, in my latest solution a single symbol will be associated to many classes. Here ar

[PATCH] D129498: [analyzer] Add new function `clang_analyzer_value` to ExprInspectionChecker

2022-07-11 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: martong, steakhal, NoQ, Charusso. ASDenysPetrov added a project: clang. Herald added subscribers: manas, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun. Herald added a pr

[PATCH] D112621: [analyzer][solver] Introduce reasoning for not equal to operator

2022-07-11 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @manas ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112621/new/ https://reviews.llvm.org/D112621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D104647: [analyzer] Support SVal::getType for pointer-to-member values

2022-07-11 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. Herald added a project: All. @vsavchenko Is this alive? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104647/new/ https://reviews.llvm.org/D104647 ___ cfe-commits mailing l

[PATCH] D129498: [analyzer] Add new function `clang_analyzer_value` to ExprInspectionChecker

2022-07-12 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D129498#3644222 , @NoQ wrote: > Looks great! > > Maybe `clang_analyzer_range()` instead? This was its first name. I refused. First, because it emits concrete integers as well and moreover we can extend it for arrays or

[PATCH] D129498: [analyzer] Add new function `clang_analyzer_value` to ExprInspectionChecker

2022-07-13 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 444336. ASDenysPetrov added a comment. Constrained the test by adding llvm-lit `REQUIRES` command. Documented a new function at https://clang.llvm.org/docs/analyzer/developer-docs/DebugChecks.html CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D129678: Tidy up handler-functions in SymbolicRangeInferrer

2022-07-13 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: martong, steakhal, NoQ. ASDenysPetrov added a project: clang. Herald added a subscriber: rnkovacs. Herald added a project: All. ASDenysPetrov requested review of this revision. Herald added a subscriber: cfe-commits. Sorted some h

[PATCH] D129498: [analyzer] Add new function `clang_analyzer_value` to ExprInspectionChecker

2022-07-14 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 444689. ASDenysPetrov added a comment. Stick to name `clang_analyzer_value`. Change function name from `printRange` to `printValue`. Make description more precise in the documentation. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129498/new/

[PATCH] D129678: [analyzer][NFC] Tidy up handler-functions in SymbolicRangeInferrer

2022-07-14 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 444752. ASDenysPetrov added a comment. Fixed a typo that caused `constraint_manager_negate.c` and `unary-sym-expr.c` tests crashes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129678/new/ https://reviews.llvm.org/D129678 Files: clang/lib

[PATCH] D129678: [analyzer][NFC] Tidy up handler-functions in SymbolicRangeInferrer

2022-07-15 Thread Denys Petrov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG82f76c04774f: [analyzer][NFC] Tidy up handler-functions in SymbolicRangeInferrer (authored by ASDenysPetrov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D112621: [analyzer][solver] Introduce reasoning for not equal to operator

2022-07-15 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @manas I'm sorry but it seems like I brought you a new work :-) I've just loaded these two patches (D129678 and D129498 ) and now you have to rebase your changes. But there is a good news as wel

[PATCH] D129498: [analyzer] Add new function `clang_analyzer_value` to ExprInspectionChecker

2022-07-15 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov closed this revision. ASDenysPetrov added a comment. Closed with bc08c3cb7f8e797fee14e96eedd3dc358608ada3 Comment at: clang/test/Analysis/print-ranges.cpp:1 +// RUN: %clang_analyze_cc1 -analyze

[PATCH] D130029: [analyzer][NFC] Use `SValVisitor` instead of explicit helper functions

2022-07-18 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: martong, NoQ, steakhal. ASDenysPetrov added a project: clang. Herald added subscribers: manas, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun. Herald added a project: All

[PATCH] D130029: [analyzer][NFC] Use `SValVisitor` instead of explicit helper functions

2022-07-18 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D90157#2518118 , @steakhal wrote: > Why don't you use the `SValVisitor` instead? @steakhal Finally fulfilled you suggestion :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D112621: [analyzer][solver] Introduce reasoning for not equal to operator

2022-07-19 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D112621#3660256 , @manas wrote: > Is there any other way to formulate the expression so that it constructs `LHS > = [1, 2] U [8, 9]` and doesn't bifurcate? Try this `u1 > 0 && u1 < 10 && u1 != 3 && u1 != 4 && u1 != 5 &&

[PATCH] D130029: [analyzer][NFC] Use `SValVisitor` instead of explicit helper functions

2022-07-19 Thread Denys Petrov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa364987368a1: [analyzer][NFC] Use `SValVisitor` instead of explicit helper functions (authored by ASDenysPetrov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D130372: [analyzer] Add a new factory function RangeSet::Factory::invert

2022-07-22 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: martong, NoQ, steakhal, balazske. ASDenysPetrov added a project: clang. Herald added subscribers: manas, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun. Herald added a pr

[PATCH] D103096: [analyzer] Implement cast for ranges of symbolic integers

2022-05-13 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D103096#3502955 , @martong wrote: > Ping Thank you, folk, for taking you time. I'll surely make corresponding changes according ещ your suggestions and notify you then. Sorry, @martong, for the late response. I'm prett

[PATCH] D77062: [analyzer] Improve zero assumption in CStringChecke::assumeZero

2020-09-24 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @steakhal > I would not accept this patch unless this investigation is done. However, I'm > not inherently against this change. Actually I've done the investigation. You can find it here https://reviews.llvm.org/D77062#1977613 The bug is somewhere deep in the co

[PATCH] D85984: [analyzer] Add a new checker alpha.cplusplus.CPlusPlus11Lock

2020-09-24 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @NoQ Comment at: clang/test/Analysis/Checkers/CPlusPlus11LockChecker.cpp:379-382 +void rm_bad1() { + rm1.lock(); // no-warning + rm1.lock(); // expected-warning{{This lock has already been acquired}} +} NoQ wrote: > ASDenysPetro

[PATCH] D87146: [analyzer] Implement shared semantics checks for XNU functions in PthreadLockChecker

2020-09-25 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. It would be nice if someone had time to look at this. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87146/new/ https://reviews.llvm.org/D87146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D87146: [analyzer] Implement shared semantics checks for XNU functions in PthreadLockChecker

2020-09-28 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @baloghadamsoftware > Sorry, absolutely no competence. That's OK. I've added a clarification section to the summary to make it easier to understand my intentions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87146/new/ https://reviews.llvm.org/D87146

[PATCH] D77062: [analyzer] Improve zero assumption in CStringChecke::assumeZero

2020-09-28 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @steakhal > If we get the value of `**b`, we get a //NonLoc// of type //unsigned char//. > The dump of `**b` confirms this: `reg_$4 Element{SymRegion{reg_$0},0 S64b,unsigned char}>`, which is a > `NonLoc` in deed. Exactly. That's what I've been trying to explaine

[PATCH] D85984: [analyzer] Add a new checker alpha.cplusplus.CPlusPlus11Lock

2020-08-25 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 287669. ASDenysPetrov added a comment. Added recursive_mutex support. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85984/new/ https://reviews.llvm.org/D85984 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td clang/lib/Static

[PATCH] D85984: [analyzer] Add a new checker alpha.cplusplus.CPlusPlus11Lock

2020-08-26 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @NoQ > That's completely different checker logic. I think, I got the message. The real recursive logic can be caught here: std::recursive_mutex rm; void recur1() { recur2(); } void recur2() { rm.lock(); recur1(); // here we can ignore the meet

[PATCH] D77062: [analyzer] Improve zero assumption in CStringChecke::assumeZero

2020-08-26 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. One more ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77062/new/ https://reviews.llvm.org/D77062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D85984: [analyzer] Add a new checker alpha.cplusplus.CPlusPlus11Lock

2020-08-26 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 287997. ASDenysPetrov edited the summary of this revision. ASDenysPetrov added a comment. Added support of: - std::timed_mutex - std::recursive_timed_mutex - std::shared_mutex - std::shared_timed_mutex CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D85431: [analyzer] Implement a new checker ThreadPrimitivesChecker

2020-08-26 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov abandoned this revision. ASDenysPetrov added a comment. Guys! I've moved my work to PthreadLockChecker https://reviews.llvm.org/D85984. You are welcome to look at it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85431/new/ https://reviews.llvm.org/D85431 ___

[PATCH] D85984: [analyzer] Add a new checker alpha.cplusplus.CPlusPlus11Lock

2020-08-31 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 288930. ASDenysPetrov added a comment. Added //shared// semantics checks and correspondent tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85984/new/ https://reviews.llvm.org/D85984 Files: clang/include/clang/StaticAnalyzer/Checkers/Ch

[PATCH] D86533: (Urgent!) [release][docs][analyzer] Add 11.0.0. release notes

2020-09-01 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/docs/ReleaseNotes.rst:453 + equal or known to be non-equal. + +- Added :ref:`on-demand parsing ` capability to Cross Translation I've added the patch "Reasoning about comparison expressions in RangeConstra

[PATCH] D85984: [analyzer] Add a new checker alpha.cplusplus.CPlusPlus11Lock

2020-09-01 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 289190. ASDenysPetrov added a comment. Added //timed// functions support and tests for them. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85984/new/ https://reviews.llvm.org/D85984 Files: clang/include/clang/StaticAnalyzer/Checkers/Checker

[PATCH] D77062: [analyzer] Improve zero assumption in CStringChecke::assumeZero

2020-09-03 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. A gentle notification :-) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77062/new/ https://reviews.llvm.org/D77062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D87138: [analyzer] Introduce refactoring of PthreadLockChecker

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

[PATCH] D87138: [analyzer][NFC] Introduce refactoring of PthreadLockChecker

2020-09-04 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D87138#2256360 , @martong wrote: > This seems to be a total non-functional-change. Please include [NFC] next > time with a similar refactoring. Otherwise, Looks good to me, thanks! Thanks! Added [NFC] to the title. Rep

[PATCH] D86295: [analyzer] Reorder the layout of MemRegion and cache by hand for optimal size

2020-09-04 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov accepted this revision. ASDenysPetrov added a comment. This revision is now accepted and ready to land. The change LGTM,!. If it really can speed up performance or improve memory organization, let's load this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D87146: [analyzer] Implement shared semantics checks for XNU functions in PthreadLockChecker

2020-09-06 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 290131. ASDenysPetrov added a comment. Fixed some missed conditions. Added more tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87146/new/ https://reviews.llvm.org/D87146 Files: clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp

[PATCH] D87146: [analyzer] Implement shared semantics checks for XNU functions in PthreadLockChecker

2020-09-06 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 290133. ASDenysPetrov added a comment. Minor fixes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87146/new/ https://reviews.llvm.org/D87146 Files: clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp clang/test/Analysis/Inputs/system

[PATCH] D87146: [analyzer] Implement shared semantics checks for XNU functions in PthreadLockChecker

2020-09-06 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 290134. ASDenysPetrov added a comment. Test fix. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87146/new/ https://reviews.llvm.org/D87146 Files: clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp clang/test/Analysis/Inputs/system-he

[PATCH] D85984: [analyzer] Add a new checker alpha.cplusplus.CPlusPlus11Lock

2020-09-06 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 290135. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85984/new/ https://reviews.llvm.org/D85984 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp clang/test/Analysis/C

<    1   2   3   4   5   6   7   >