[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-08-28 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 162942. Charusso marked an inline comment as done. Charusso retitled this revision from "[clang-tidy] New checker for not null-terminated result caused by strlen or wcslen" to "[clang-tidy] New checker for not null-terminated result caused by strlen(), size(

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-07-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 157916. Charusso added a comment. Excuse me for the huge patch, but what I can done wrongly, I did, so I have made tons of revision. I would like to show the current direction of the checker. Currently it has too much overlapping function, so please don't

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-07-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 2 inline comments as done. Charusso added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:377-381 +FixItHint::CreateInsertion(exprLocEnd(LengthExpr, Result), ") + 1"); +Diag << InsertFirstParenFix << InsertPlusOneAndSe

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-05-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 149116. Charusso added a comment. @xbolva00 idea implemented, doubled the checker's power. Now if the given argument is a DeclRefExpr this should handle it as it would be inlined as a simple CallExpr. Results: I have found 37 `memcpy()` and 2 `memchr()` er

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-05-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 149129. Charusso added a comment. Clang format. https://reviews.llvm.org/D45050 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp clang-tidy/bugprone/NotNullTer

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-05-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In https://reviews.llvm.org/D45050#1116361, @xbolva00 wrote: > memcpy(crypt_buf, passwd, passwd_len); <--- warning > memcpy(crypt_buf + passwd_len, salt, salt_len); > > This is a false warning since it appends strings using memcpy. But no idea > what to do and if it is

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-06-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In https://reviews.llvm.org/D45050#1116446, @lebedev.ri wrote: > I would like to see more negative tests. > What does it do if the len/size is a constant? > Variable that wasn't just assigned with `strlen()` return? Thanks for the comment! What do you mean by negativ

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-06-09 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 150643. Charusso marked 4 inline comments as done. Charusso added a comment. `memchr()` revision: it is problematic if the second argument is `'\0'`, there is no other case. Added a new type of matcher, to match function calls. More static functions and tes

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-06-09 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. @lebedev.ri there is all the false positive results from the last publicated result-dump: F6334659: curl-lib-curl_path-c.html second result: F6334660: ffmpeg-libavformat-sdp.c.html all result: F633

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-06-09 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 150644. Charusso added a comment. Clang format. https://reviews.llvm.org/D45050 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp clang-tidy/bugprone/NotNullTer

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-06-09 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 150645. Charusso added a comment. Fix some comment. https://reviews.llvm.org/D45050 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp clang-tidy/bugprone/NotNul

[PATCH] D53076: [analyzer] WIP: Enhance ConditionBRVisitor to write out more information

2018-10-10 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added subscribers: baloghadamsoftware, whisperity. Charusso added a comment. In https://reviews.llvm.org/D53076#1260663, @george.karpenkov wrote: > The change makes sense to me, but: > > 1. Note that "Assuming X" directives are useful for the analyzer developers, > since they know that'

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-10-12 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks everyone for the contribution! https://reviews.llvm.org/D45050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-10-13 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a subscriber: klimek. Charusso added a comment. In https://reviews.llvm.org/D45050#1264435, @JonasToth wrote: > Unfortunatly this check does not compile on some ARM platforms. It seems that > a matcher exceeds the recursion limit in template instantations. > > http://lab.llvm.org:

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-10-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In https://reviews.llvm.org/D53076#1261134, @NoQ wrote: > For example, in the `inline-plist.c`'s `bar()` on line 45, Static Analyzer > indeed doesn't assume that `p` is equal to null; instead, Static Analyzer > *knows* it for sure. Thanks you! This a great example wh

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-10-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h:202 + void finalizeConstraints() { +Constraints.clear(); + } george.karpenkov wrote: > These constraints are conceptually part of the visitor, n

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-10-25 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1853 + +const auto *Cond = cast(PS->getStmt()); +auto Piece = VisitTrueTest(Cond, tag == tags.first, BRC, BR, N); george.karpenkov wrote: > How do we know that it'

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-10-25 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks everyone for the review! @george.karpenkov could you commit it please? I am interested in your ideas in the little discussion started with @NoQ at the beginning of the project. https://reviews.llvm.org/D53076 ___ c

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-10-25 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In https://reviews.llvm.org/D53076#1276270, @george.karpenkov wrote: > @NoQ has a good point: we need to preserve the distinction between the things > analyzer "assumes" and the things analyzer "knows". Yes, but I think it should be a new patch because I would like to

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-10-25 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In https://reviews.llvm.org/D53076#1276277, @NoQ wrote: > I mean, the idea of checking constraints instead of matching program points > is generally good, but the example i gave above suggests that there's a bug > somewhere. I think it is an unimplemented feature whi

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-10-27 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: test/Analysis/MisusedMovedObject.cpp:187 A a; -if (i == 1) { // expected-note {{Taking false branch}} expected-note {{Taking false branch}} +if (i == 1) { // expected-note {{Assuming 'i' is not equal to 1}} expected-note

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-10-27 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: test/Analysis/Inputs/expected-plists/cxx-for-range.cpp.plist:837 + message + Variable 'fail' is true + Double negating is not in standard English, so this behaviour is documented here. Co

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2019-01-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks you @NoQ! Luckily it is rely on `ProgramPoints` now. The only problem as I see the mentioned Z3-test, where I have no idea what happened. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53076/new/ https://reviews.llvm.org/D53076 ___

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-11-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 8 inline comments as done. Charusso added a comment. @NoQ thanks you for the great explanation! I really wanted to write out known constant integers and booleans but I think 'Knowing...' pieces would be more cool. I tried to minimize the changes after a little e-mailing with @ge

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-11-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: test/Analysis/diagnostics/macros.cpp:33 void testDoubleMacro(double d) { - if (d == DBL_MAX) { // expected-note {{Taking true branch}} + if (d == DBL_MAX) { // expected-note {{Assuming 'd' is equal to DBL_MAX}} +

[PATCH] D54560: [analyzer] MoveChecker Pt.3: Improve warning messages a bit.

2018-11-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In https://reviews.llvm.org/D54560#1301870, @NoQ wrote: > Write down full messages in tests. When the message was updated from `'x' is > moved'` to `Object 'x' is moved`, the tests were not updated because they > kept passing because the former is still a sub-string of

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-11-21 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In https://reviews.llvm.org/D53076#1305209, @Szelethus wrote: > In the meanwhile we managed to figure out where the problem lays, so if > you're interested, I'm going to document it here. > > The patch attempts to solve this by inspecting the actual condition, and > tr

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-11-25 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Sorry for the huge noise! It took me a while to see what is the problem. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53076/new/ https://reviews.llvm.org/D53076 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-11-25 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. @Szelethus thanks you for the comments! In D53076#1307336 , @Szelethus wrote: > I think the reason why the printed message was either along the lines of > "this is 0" and "this is non-0", is that we don't necessarily know what

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-11-26 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 2 inline comments as done. Charusso added a comment. @george.karpenkov thanks you for the comments! In D53076#1308641 , @george.karpenkov wrote: > What about just dropping the `Knowing` prefix? > Just having `arr is null, taking true bra

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso requested changes to this revision. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1985 bool partOfParentMacro = false; +StringRef PName = ""; if (ParentEx->getBeginLoc().isMacroID()) { `Pa

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-03-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D58367#1423451 , @NoQ wrote: > Found a bug! The lambda has to manually make sure that the bug report > actually does have something to do with the checker. I think message-semantic is better than storing some data in two pla

[PATCH] D54811: [analyzer] ConditionBRVisitor: Remove GDM checking

2019-03-16 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356318: [analyzer] ConditionBRVisitor: Remove GDM checking (authored by Charusso, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang CHANGES SINCE LAST ACTION https://review

[PATCH] D57896: Variable names rule

2019-03-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added subscribers: chandlerc, Charusso. Charusso added a comment. In D57896#1406812 , @lattner wrote: > I can understand Zach's position here, but LLDB has historically never > conformed to the general LLVM naming or other conventions due to its

[PATCH] D57896: Variable names rule

2019-03-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D57896#1435245 , @lattner wrote: > FWIW, my suggestion is *not* to expand names like DRE to decl_ref_expr, I > agree that doesn't add clarity to the code. Two possibilities: "dre", or > "decl" which is what I would write tod

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-03-26 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. Cool! I have found this message-semantic idea useful in Unity where every `GameObject` could talk with each other in a very generic way (https://docs.unity3d.com/ScriptReference/GameObject

[PATCH] D59857: [analyzer] PR37501: Disable the assertion for reverse-engineering logical op short circuits.

2019-03-27 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. There is no connection with my reverse-engineering reverted patch: https://reviews.llvm.org/D57410?id=184992 ? It evaluates the left and the right side and may it could help. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59857/new/ htt

[PATCH] D59861: [analyzer] NFC: Replace Taint API with a usual inter-checker communication API?

2019-03-27 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. I like the idea to put connecting stuff together in the same file to create more understandable code. LGTM. Comment at: clang/lib/StaticAnalyzer/Checkers/Taint.h:8 +// +

[PATCH] D59901: [analyzer] PR41239: Fix a crash on invalid source location in NoStoreFuncVisitor.

2019-03-27 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. Nice solution. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59901/new/ https://reviews.llvm.org/D59901 ___

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D59121#1448367 , @NoQ wrote: > On second thought, dunno. In the scan-build macro preview it wouldn't show > you UINT32_MAX anyway. Maybe let's keep this behavior. > > Cleaned up the patch a little bit. Somehow on the `Assumi

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D59121#1448386 , @NoQ wrote: > Mmm, that *is* an `Assuming...` piece, i.e., this is the same code, just the > structure of macros is more complicated than usual. You told me we would like to see a value when we hover over a

[PATCH] D59121: [analyzer] Fix macro names in diagnostics within bigger macros.

2019-03-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. Nice catch! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59121/new/ https://reviews.llvm.org/D59121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D60107: [analyzer] NoStoreFuncVisitor: Suppress bug reports with no-store in system headers.

2019-04-04 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. It is very good to try one improvement in another similar function. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:364 QualType T = PVD->getType

[PATCH] D53076: [analyzer] ConditionBRVisitor: Enhance to write out more information

2019-04-14 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks you @NoQ for the great idea! Without the duplicated `BugReport.cpp` reports it could be an on-by-default patch, see: Before: F8685549: before.html After: F8685550: after.html It is not per

[PATCH] D60732: [analyzer] NFC: Use -verify=... in MoveChecker tests.

2019-04-15 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. I think this functionality is unused because you would split the file into six to reduce the overhead/scroll and that is it. It is a cool reveal, could you provide a documentation? Repos

[PATCH] D60845: [VerifyDiagnosticConsumer] Document -verify= in doxygen

2019-04-17 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. Thanks you! I really like live working examples, I hope not just me. Could you link https://github.com/llvm/llvm-project/blob/master/clang/test/Analysis/use-after-move.cpp as well as a li

[PATCH] D61051: [analyzer] Treat functions without runtime branches as "small".

2019-04-28 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. Great patch! There is only a design problem: You have negated every `isSmall()` condition looks like you could write `isLarge()` instead but there is no connection between these functions.

[PATCH] D61285: [analyzer] SmartPtrModeling: Fix a null dereference.

2019-04-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. When I see `->*` I go mad, but we should handle unknown stuff, cool patch. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61285/new/ https://reviews.llvm.or

[PATCH] D61545: [analyzer] Fix a crash in RVO from within blocks.

2019-05-04 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. I think the entire `LocationContext` stuff is a huge design issue, and you used its functionality without any hack. If you would rename the `getStackFrame` to `getNextStackFrame` or someth

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-09-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 166802. Charusso marked 28 inline comments as done. Charusso added a comment. - Refactor and better English thanks for @whisperity! - Removed `InjectUL` option so the checker handles the special case if the capacity of a buffer is `int.Max()` https://revi

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-09-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. The results are accessible trough the `index.html` in each folder: F7303310: results.rar @aaron.ballman a friendly reminder. https://reviews.llvm.org/D45050 ___ cfe-commits mailing list

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-09-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 167597. Charusso marked 37 inline comments as done. Charusso edited the summary of this revision. Charusso added a comment. Thanks for the very in-depth review @aaron.ballman! I have not found a way to obtain the instance of Preprocessor nicely, but it is w

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-09-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:1038 + + SmallString<128> NewAddNullTermExprStr; + NewAddNullTermExprStr = "\n"; aaron.ballman wrote: > JonasToth wrote: > > whisperity wrote: > > > aaron.ballman w

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-02-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso requested changes to this revision. Charusso added a comment. This revision now requires changes to proceed. First of all, thanks you for working on this, as I wanted to do the same, but I did not know how to. I did not know also that 15 of the checkers already implements `BugReporterVi

[PATCH] D58368: [analyzer] MIGChecker: Implement bug reporter visitors.

2019-02-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a reviewer: Charusso. Charusso requested changes to this revision. Charusso added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/StaticAnalyzer/Checkers/MIGChecker.cpp:113 + }); + C.addTransition(C.getState()->set(true), T);

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2019-02-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D53076#1403436 , @NoQ wrote: > I'll take a closer look in a few days, sorry for the delays! The progress > you're making is fantastic and i really appreciate your work, but i have an > urgent piece of work of my own to deal w

[PATCH] D58368: [analyzer] MIGChecker: Implement bug reporter visitors.

2019-02-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MIGChecker.cpp:47 REGISTER_TRAIT_WITH_PROGRAMSTATE(ReleasedParameter, bool); `;` is not necessary. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58368/new/ https://revie

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-02-21 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In general I think it would be cool to think all of the problems in the same time as these really depends on the `CoreEngine` and how we operates with `ExplodedNodes`. In D58367#1405185 , @NoQ wrote: > In particular, the implem

[PATCH] D58368: [analyzer] MIGChecker: Implement bug reporter visitors.

2019-02-21 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D58368#1406490 , @NoQ wrote: > Address comments. > > @Charusso: I agreed not to rush for D58367 > and implemented an old-style visitor here instead :) Thanks you! I wanted to accept it when

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-22 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. bitcoin: sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-all-dev software-properties-common libminiupnpc-dev libzmq3-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-de

[PATCH] D62638: [analyzer] A Python script to prettify the ExplodedGraph dumps.

2019-05-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Sorry for that much rewrite request but in a script language you have to name your stuff properly or you will be completely lost. I have not written a single Python class yet, but trust me. I really like that `DotDumpVisitor` semantic, but it would be a lot better at

[PATCH] D62658: [analyzer] print() JSONify: ExplodedNode revision

2019-05-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet. Revert node-ID removal. Repository:

[PATCH] D62716: [analyzer] Fix JSON dumps for dynamic types, add test.

2019-05-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. Not sure why I was blind here, thanks you! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62716/new/ https://reviews.llvm.org/D62716

[PATCH] D62658: [analyzer] print() JSONify: ExplodedNode revision

2019-05-31 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362249: [analyzer] print() JSONify: ExplodedNode revision (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://r

[PATCH] D62754: [analyzer] Fix JSON dumps for location contexts.

2019-05-31 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. That was my feeling as well, but it has been defined like that. Thanks for the clarification! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62754/new/ htt

[PATCH] D62638: [analyzer] A Python script to prettify the ExplodedGraph dumps.

2019-05-31 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/utils/analyzer/exploded-graph-rewriter.py:151 +super(ExplodedGraph, self).__init__() +self.nodes = collections.defaultdict(ExplodedNode) +self.root_id = None NoQ wrote: > Charusso wrote: >

[PATCH] D62638: [analyzer] A Python script to prettify the ExplodedGraph dumps.

2019-05-31 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D62638#1525823 , @NoQ wrote: > Also switched to python2 because it seems to be the default. The differences > are minimal. What about the state of the patch itself? Planned stuff WIP, could I take it to SVGify, or? CHANGE

[PATCH] D62638: [analyzer] A Python script to prettify the ExplodedGraph dumps.

2019-05-31 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/utils/analyzer/exploded-graph-rewriter.py:191 +.replace('\\>', '>') \ +.rstrip(',') +logging.debug(raw_json) NoQ wrote: > Charusso wr

[PATCH] D62761: [analyzer] exploded-graph-rewriter: Implement a --diff mode.

2019-05-31 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D62761#1525917 , @NoQ wrote: > Remove "-" from program point dumps because it resembles a removal marker in > diffs. Could you add an image? I have not seen any problematic stuff, just that. CHANGES SINCE LAST ACTION htt

[PATCH] D62638: [analyzer] A Python script to prettify the ExplodedGraph dumps.

2019-05-31 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. Let us see those tests! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62638/new/ https://reviews.llvm.org/D62638 ___ cfe-commits mai

[PATCH] D62638: [analyzer] A Python script to prettify the ExplodedGraph dumps.

2019-06-04 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: cfe/trunk/utils/analyzer/exploded-graph-rewriter.py:1 +#!/usr/bin/env python + ``` # something else then # #==- exploded-graph-rewriter.py - Simplifies the ExplodedGraph -*- python -*-==# # # Part of the LLVM Project, u

[PATCH] D60670: [analyzer] [NFC] PathDiagnostic: Create PathDiagnosticPopUpPiece

2019-06-05 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Fix a nit in rL362632 . Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60670/new/ https://reviews.llvm.org/D60670 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-05 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet. When we traversed backwards on Explode

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass constructing objects to see inlined calls

2019-06-06 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:835-842 // First, find when we processed the statement. do { if (auto CEE = Node->getLocationAs()) if (CEE->getCalleeContext()->getCallSite() == S)

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass constructing objects to see inlined calls

2019-06-06 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 203324. Charusso marked 4 inline comments as done. Charusso retitled this revision from "[analyzer] ReturnVisitor: Bypass everything to see inlined calls" to "[analyzer] ReturnVisitor: Bypass constructing objects to see inlined calls". Charusso added a comme

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass constructing objects to see inlined calls

2019-06-06 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 203326. Charusso added a comment. - Better wording. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62926/new/ https://reviews.llvm.org/D62926 Files: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp clang/test/Analysis/new-ctor-null-throw.c

[PATCH] D62946: [analyzer] ProgramPoint: more explicit printJson()

2019-06-06 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet. Now we print out every possible kinds

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass constructing objects to see inlined calls

2019-06-06 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked an inline comment as done. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:835-842 // First, find when we processed the statement. do { if (auto CEE = Node->getLocationAs()) if (CEE->getCa

[PATCH] D62978: [analyzer] ReturnVisitor: Handle non-null ReturnStmts

2019-06-06 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet. Charusso added a comment. Suppressed e

[PATCH] D62978: [analyzer] ReturnVisitor: Handle non-null ReturnStmts

2019-06-06 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Suppressed example: F9091784: return-non-null.html Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62978/new/ https://reviews.llvm.org/D62978 ___ cfe-commi

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass constructing objects to see inlined calls

2019-06-06 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. If I run `scan-build` on LLVM this is the only non-bypassed case since the first diff: F9091851: non-bypassed.html I think it is working well. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62926/new/ https://reviews.llvm.or

[PATCH] D62946: [analyzer] ProgramPoint: more explicit printJson()

2019-06-06 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D62946#1533592 , @NoQ wrote: > Fair enough! > > Tests are welcome. Is it possible? E.g. I have not found any case for `PostCondition` and may it requires 10+ of dot dumps which is very space-consuming. I think test to print

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass constructing objects to see inlined calls

2019-06-07 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 203635. Charusso marked 2 inline comments as done. Charusso added a comment. - Added `CallExpr` as being purged away - More test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62926/new/ https://reviews.llvm.org/D62926 Files: clang/lib/StaticAnal

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass constructing objects to see inlined calls

2019-06-07 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D62926#1533560 , @NoQ wrote: > I'd like to have a test in which the constructor is //inlined//. What do you mean by that test? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62926/new/ https://reviews.llvm.org/D6292

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-10 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 203874. Charusso retitled this revision from "[analyzer] ReturnVisitor: Bypass constructing objects to see inlined calls" to "[analyzer] ReturnVisitor: Bypass everything to see inlined calls". Charusso added a comment. - The most generic approach. CHANGES

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-10 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 2 inline comments as done. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:842-849 + if (Optional CEE = Node->getLocationAs()) if (CEE->getCalleeContext()->getCallSite() == S) break; -

[PATCH] D62978: [analyzer] ReturnVisitor: Handle unknown ReturnStmts better

2019-06-10 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 203876. Charusso retitled this revision from "[analyzer] ReturnVisitor: Handle non-null ReturnStmts" to "[analyzer] ReturnVisitor: Handle unknown ReturnStmts better". Charusso edited the summary of this revision. Charusso added a comment. - The report was to

[PATCH] D62978: [analyzer] ReturnVisitor: Handle unknown ReturnStmts better

2019-06-10 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D62978#1533558 , @NoQ wrote: > Ah, that positive! Positive == true positive, not false positive, I got it. > No, i don't think this is a valid way to suppress it. Bought me, they are worth to report. The misleading reports

[PATCH] D63093: [analyzer] WIP: MallocChecker: Release temporary CXXNewExpr

2019-06-10 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet. - Repository: rC Clang https://re

[PATCH] D63093: [analyzer] WIP: MallocChecker: Release temporary CXXNewExpr

2019-06-10 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso planned changes to this revision. Charusso added a comment. This is heavily WIP as sometimes we have to release a `new` after we return it or a constructor did something with that. The direction is okay? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D6309

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-11 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 2 inline comments as done. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:842-849 + if (Optional CEE = Node->getLocationAs()) if (CEE->getCalleeContext()->getCallSite() == S) break; -

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-11 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 204111. Charusso marked an inline comment as done. Charusso added a comment. - I have used `LocationContext::isParentOf()`which is not worked well, so I thought we are out of our context. - With that I made some misleading assumptions about our code. CHANG

[PATCH] D62978: [analyzer] trackExpressionValue(): Handle unknown values better

2019-06-11 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 8 inline comments as done. Charusso added inline comments. Comment at: clang/test/Analysis/diagnostics/deref-track-symbolic-region.c:14 int m = 0; - syz.x = foo(); // expected-note{{Value assigned to 'syz.x'}} Here. Commen

[PATCH] D62761: [analyzer] exploded-graph-rewriter: Implement a --diff mode.

2019-06-11 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. I asked for the new behavior, but I think it should be cool. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62761/new/ https://reviews.llvm.org/D62761 __

[PATCH] D62761: [analyzer] exploded-graph-rewriter: Implement a --diff mode.

2019-06-11 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D62761#1539143 , @NoQ wrote: > In D62761#1539137 , @Charusso wrote: > > > I asked for the new behavior, but I think it should be cool. > > > The new behavior is on the original screensho

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-12 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 204331. Charusso marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62926/new/ https://reviews.llvm.org/D62926 Files: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp clang/test/Analysis/inlining/placement-new-f

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-12 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D62926#1539191 , @NoQ wrote: > All right, it seems that i'm completely misunderstanding this problem and > we've been talking past each other this whole time. > > The problem is not that we need to skip the `CXXConstructExpr`.

[PATCH] D62946: [analyzer] ProgramPoint: more explicit printJson()

2019-06-12 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363187: [analyzer] ProgramPoint: more explicit printJson() (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-13 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 204625. Charusso marked 3 inline comments as done. Charusso added a comment. - Fixed comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62926/new/ https://reviews.llvm.org/D62926 Files: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-13 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 204698. Charusso marked an inline comment as done. Charusso added a comment. - Whoops. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62926/new/ https://reviews.llvm.org/D62926 Files: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp clang/

  1   2   3   4   5   6   7   >