[PATCH] D66042: [analyzer] Analysis: Silence checkers

2019-08-14 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:483-504 + if (!AnOpts.RawSilencedCheckersAndPackages.empty()) { +std::vector Checkers = +AnOpts.getRegisteredCheckers(/*IncludeExperimental=*/true); +std::vector Packages = +

[PATCH] D66267: [analyzer] TrackConstraintBRVisitor: Do not track unknown values

2019-08-14 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Charusso added a parent revision: D65889: [analyzer] CastValueCh

[PATCH] D66267: [analyzer] TrackConstraintBRVisitor: Do not track unknown values

2019-08-15 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked an inline comment as done. Charusso added a comment. @Szelethus pointed out well. My patch is about nullability, and it is perfect. The bug report you made is about deduplication rather than nullability. The fact is we fail to call the deduplication function: `eventsDescribeSame

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types in DynamicTypeMap

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

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types in DynamicTypeMap

2019-08-15 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. @xazax.hun It is somehow performance critical code as we have too many casts in the LLVM. I would really appreciate it if you could review it. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66325/new/ https://reviews.llvm.org/D66325 _

[PATCH] D66042: [analyzer] Analysis: Silence checkers

2019-08-15 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 215518. Charusso marked 10 inline comments as done. Charusso added a comment. - Rebased. - Added the remaining FIXME. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66042/new/ https://reviews.llvm.org/D66042 Files: clang-tools-extra/clang-tidy/Cl

[PATCH] D66042: [analyzer] Analysis: Silence checkers

2019-08-15 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks for the reviews! Comment at: clang/lib/Frontend/CompilerInvocation.cpp:483-504 + if (!AnOpts.RawSilencedCheckersAndPackages.empty()) { +std::vector Checkers = +AnOpts.getRegisteredCheckers(/*IncludeExperimental=*/true); +std::ve

[PATCH] D66042: [analyzer] Analysis: Silence checkers

2019-08-15 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369078: [analyzer] Analysis: Silence checkers (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.

[PATCH] D66267: [analyzer] TrackConstraintBRVisitor: Do not track unknown values

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

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 215893. Charusso retitled this revision from "[analyzer] CastValueChecker: Store the dynamic types in DynamicTypeMap" to "[analyzer] CastValueChecker: Store the dynamic types and casts". Charusso added a comment. This patch introduces `DynamicCastInfo` simi

[PATCH] D66423: [analyzer] CastValueChecker: Model isa(), isa_and_nonnull()

2019-08-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Charusso added a parent revision: D66325: [analyzer] CastValueCh

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeMap.h:32 +/// A set of dynamic cast informations. +REGISTER_SET_WITH_PROGRAMSTATE(DynamicCastSet, clang::ento::DynamicCastInfo) NoQ wrote: > Emm, so yo

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeMap.h:32 +/// A set of dynamic cast informations. +REGISTER_SET_WITH_PROGRAMSTATE(DynamicCastSet, clang::ento::DynamicCastInfo) NoQ wrote: > Charusso w

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D66325#1636091 , @NoQ wrote: > Yay! I understand the rough idea and it looks perfectly reasonable to start > with. Please add FIXMEs/TODOs on how we eventually want to support more > complicated inheritance hierarchies. I h

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 216023. Charusso edited the summary of this revision. Charusso added a comment. - Use a set factory to store a dynamic cast information set per memory region. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66325/new/ https://reviews.llvm.org/D66325

[PATCH] D63684: [analyzer] exploded-graph-rewriter: NFC: Extract some code into functions.

2019-06-22 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 that abstraction! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63684/new/ https://reviews.llvm.org/D63684 __

[PATCH] D63685: [analyzer] exploded-graph-rewriter: Add support for range constraints.

2019-06-22 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 is a great design-decision, thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63685/new/ https://reviews.llvm.org/D63685 __

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 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. After evaluation it would be an Unknow

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. - Make the test fail. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63720/new/ https://reviews.llvm.org/D63720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 206227. Charusso added a comment. - Make the test pass. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63720/new/ https://reviews.llvm.org/D63720 Files: clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp clang/test/Analysis/symbol-escape.cpp Index

[PATCH] D63436: [analyzer] Fix JSON dumps for ExplodedNodes

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Charusso marked an inline comment as done. Closed by commit rL364193: [analyzer] Fix JSON dumps for ExplodedNodes (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

[PATCH] D63438: [analyzer] print() JSONify: ProgramPoint revision

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

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. These bitwise operations only affects the part which we do not analyze. My previous approach to solve this problem caused one false positive, so we should be that strict. Just in case for the future developments, copy-pasted here: // If we have a bitwise operation (e

[PATCH] D63462: [analyzer] JsonSupport: Escape escapes

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 206248. Charusso added a comment. - Test case added. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63462/new/ https://reviews.llvm.org/D63462 Files: clang/include/clang/Basic/JsonSupport.h clang/test/Analysis/dump_egraph.c Index: clang/test/

[PATCH] D63726: [analyzer] print() JSONify: Create pointers

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Charusso added a parent revision: D63462: [analyzer] JsonSupport

[PATCH] D63727: [analyzer] print() JSONify: Stable LocationContext IDs

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. - Repository: rC Clang https://reviews.llvm.org/D63727 Fi

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

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso abandoned this revision. Charusso added a comment. The seen error solved by D63720 . Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63093/new/ https://reviews.llvm.org/D63093

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 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/ExprEngineC.cpp:123 state = state->BindExpr(B, LCtx, Result); } I have seen we are producing tons of Unknowns and I am still not

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 206332. Charusso marked 11 inline comments as done. Charusso added a comment. - Fix. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63720/new/ https://reviews.llvm.org/D63720 Files: clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp clang/test/Analy

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 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/ExprEngineC.cpp:103 +if (const MemRegion *LeftMR = LeftV.getAsRegion()) + IsLhsPtr = LeftMR->getSymbolicBase(); +if (const MemRegion *Righ

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 206341. Charusso marked 8 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63720/new/ https://reviews.llvm.org/D63720 Files: clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp clang/test/Analysis/symbol-escape.cpp Index: clang

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp:123 state = state->BindExpr(B, LCtx, Result); } NoQ wrote: > Charusso wrote: > > I have seen we are producing tons of Unknowns and I am still not sure wher

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364259: [analyzer] ExprEngine: Escape pointers in bitwise operations (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

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

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks for the review ! That was the largest-work three lines of code of the history because I was blind. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63720/new/ https://reviews.llvm.org/D63720 ___

[PATCH] D63726: [analyzer] print() JSONify: Create pointers

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D63726#1556825 , @NoQ wrote: > Yay thx! > > For Environment they aren't that useful, but it definitely doesn't hurt. It is pretty interesting when you could track the call among the entire graph, it is could be our first `Ex

[PATCH] D63727: [analyzer] print() JSONify: Stable LocationContext IDs

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso abandoned this revision. Charusso added a comment. In D63727#1556821 , @NoQ wrote: > I think i'd rather remove it entirely. I have seen a TODO in the differentiation of such indices, just why I made it. Okai. Repository: rC Clang CHANGES S

[PATCH] D63462: [analyzer] JsonSupport: Escape escapes

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 206356. Charusso added a comment. - More test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63462/new/ https://reviews.llvm.org/D63462 Files: clang/include/clang/Basic/JsonSupport.h clang/test/Analysis/dump_egraph.c clang/test/Analysis/expl

[PATCH] D63462: [analyzer] JsonSupport: Escape escapes

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D63462#1556831 , @NoQ wrote: > See also https://xkcd.com/1638/ Well, after a month of escaping we are still have problems, so it is truly comes to your brain. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63462/new

[PATCH] D63462: [analyzer] JsonSupport: Escape escapes

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364270: [analyzer] JsonSupport: Escape escapes (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm

[PATCH] D63462: [analyzer] JsonSupport: Escape escapes

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 206357. Charusso added a comment. - A working one. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63462/new/ https://reviews.llvm.org/D63462 Files: clang/include/clang/Basic/JsonSupport.h clang/test/Analysis/dump_egraph.c clang/test/Analysis/

[PATCH] D63726: [analyzer] print() JSONify: Create pointers

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

[PATCH] D63915: [analyzer][WIP] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-06-27 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, mgorny. Options: - `apiModeling.Retur

[PATCH] D63915: [analyzer][WIP] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-06-27 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso planned changes to this revision. Charusso marked 2 inline comments as done. Charusso added a comment. Heavily WIP, see inline. Comment at: clang/test/Analysis/return-value-guaranteed.cpp:37 +bool parseFile() { + clang_analyzer_eval(error() == true); // FIXME: xpected

[PATCH] D63915: [analyzer][WIP] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-06-28 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 207133. Charusso edited the summary of this revision. Charusso added a comment. - Make it match the class name. (Whoops!) - Reorder the tuple (swap the return value with the call name). - Remove the Projects option. - Remove unnecessary input validation. CH

[PATCH] D63915: [analyzer][WIP] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-06-28 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 207135. Charusso added a comment. - Fix the note as the class name is optional. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63915/new/ https://reviews.llvm.org/D63915 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td clang/lib/S

[PATCH] D63965: [analyzer] exploded-graph-rewriter: Add support for program point tags.

2019-06-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. Good idea! Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63965/new/ https://reviews.llvm.org/D63965

[PATCH] D62441: [analyzer] NFC: Introduce a convenient CallDescriptionMap class.

2019-06-28 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. Great patch, thanks you! I wanted to make my own `IdentifierInfo` array previously. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1060 +public: + const static unsigned NoArgRequirement

[PATCH] D63968: [analyzer] Fix target region invalidation when returning into a ctor initializer.

2019-06-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. You have made a great use of that mistake by me. So that is why everything is so perfect, because it fires, just it should fire later. Thanks you! Repository: rC Clang CHANGES SINCE LA

[PATCH] D62556: [analyzer] NFC: CallDescription: Implement describing C library functions.

2019-07-01 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. I have not seen any problem. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62556/new/ https://reviews.llvm.org/D62556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63915: [analyzer][WIP] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-01 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 207366. Charusso marked 8 inline comments as done. Charusso edited the summary of this revision. Charusso added a comment. Herald added subscribers: aheejin, dschuff. - Revert the `Calls` option. It turned out too difficult to create. (May it useless, as we

[PATCH] D63915: [analyzer][WIP] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-01 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ReturnValueChecker.cpp:98 + SVal RetV = CE.getReturnValue(); + Optional RetDV = RetV.getAs(); + NoQ wrote: > `castAs` if you're sure. > > Generally it's either evaluated conservative

[PATCH] D64041: [analyzer] exploded-graph-rewriter: Add support for dynamic types.

2019-07-01 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso marked an inline comment as done. Charusso added a comment. This revision is now accepted and ready to land. Nice, the end of that huge work is getting closer. Thanks! Comment at: clang/utils/analyzer/exploded-graph-rewriter.py:229 +

[PATCH] D64047: [analyzer] exploded-graph-rewriter: Add support for objects under construction.

2019-07-01 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. SSS! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64047/new/ https://reviews.llvm.org/D64047 ___ cfe-commit

[PATCH] D64051: [analyzer] exploded-graph-rewriter: Improve program point dumps.

2019-07-01 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. Are you alright with the namings? Those are randomly came out from my head and may you know some better one. I like the idea about color tones, it is great we have a huge palette, just I

[PATCH] D64047: [analyzer] exploded-graph-rewriter: Add support for objects under construction.

2019-07-01 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso marked an inline comment as done. Charusso added a comment. Thanks for testing it! Comment at: clang/utils/analyzer/exploded-graph-rewriter.py:76 +self.stmt_id = json_ek['stmt_id'] if 'stmt_id' in json_ek \ +else jso

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-01 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D63915#1563049 , @NoQ wrote: > Aha, nice, thanks for adding a description, it is a very good thing to do. > Like, every commit should be obvious. In some of my patches I have not added a description because they are so tiny

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-01 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 207456. Charusso marked 11 inline comments as done. Charusso added a comment. - Fix. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63915/new/ https://reviews.llvm.org/D63915 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td clang/

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-01 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 2 inline comments as done. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ReturnValueChecker.cpp:82 + +Out << '\'' << Name << "' always returns " +<< (*Value ? "true" : "false"); NoQ wrote: > Char

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-01 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 207458. Charusso added a comment. - I do not like `Optional` anymore. - More simple notes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63915/new/ https://reviews.llvm.org/D63915 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td

[PATCH] D64056: [analyzer] exploded-graph-rewriter: Implement a dark color scheme.

2019-07-01 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 really like that, thanks you! When you spend tons of time it is good for your eyes and that dark theme is very cool in 2019. Comment at: clang/utils/analyzer/exploded-

[PATCH] D64100: [analyzer] exploded-graph-rewriter: Implement checker messages.

2019-07-02 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! Could you add some `#===---===#` separators, please? As it is in the finishing state, I think now it is appropriate. Repository: rC Clang CHANGES SINCE LAST ACTION https://revi

[PATCH] D64104: [analyzer] exploded-graph-rewriter: Collapse large statement pretty-prints.

2019-07-02 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 it! What about `BlockEdge` with the long terminators? (c.f. `Edge.getSrc()->printTerminatorJson()`) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64

[PATCH] D64104: [analyzer] exploded-graph-rewriter: Collapse large statement pretty-prints.

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D64104#1567326 , @NoQ wrote: > In D64104#1567317 , @Charusso wrote: > > > I like it! What about `BlockEdge` with the long terminators? (c.f. > > `Edge.getSrc()->printTerminatorJson()`)

[PATCH] D64110: [analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes.

2019-07-02 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 have removed that `is_sink` business because we have an actual graph, not just a huge painting, so you could mark whether it is sink by it has zero successors. I like the idea about refa

[PATCH] D64110: [analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes.

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D64110#1567505 , @NoQ wrote: > A non-sink node may have no successors because it ran out of statements to > execute (i.e., the analysis finishes successfully). Ah, of course, sorry. > P.S. I don't have many more plans on im

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 207668. Charusso marked 7 inline comments as done. Charusso added a comment. - Create `FunctionExitPoint` diagnostics. - Fix. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63915/new/ https://reviews.llvm.org/D63915 Files: clang/include/clang/Sta

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ReturnValueChecker.cpp:120 +<< (Value ? "true" : "false") +<< " according to the LLVM coding standard, but it returns " +<< (Value ? "false" : "true"); --

[PATCH] D64100: [analyzer] exploded-graph-rewriter: Implement checker messages.

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D64100#1567706 , @NoQ wrote: > In D64100#1567230 , @Charusso wrote: > > > Nice! Could you add some `#===---===#` separators, please? As it is in the > > finishing state, I think now it

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 207703. Charusso marked 10 inline comments as done. Charusso added a comment. - Fix. - Refactor. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63915/new/ https://reviews.llvm.org/D63915 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:98-100 +// The APIModeling package is for checkers that model APIs. These checkers are +// always turned on; this package is intended for API modeling that is not +// controlled by

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h:210 ///the default tag for the checker will be used. + /// @param IsPrunable Whether the note is prunable. ExplodedNode * It makes p

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D63915#1568166 , @Szelethus wrote: > This checker seems to only check LLVM functions, but doesn't check whether > these methods lie in the LLVM namespace. Is this intended? Thanks for the reviews! They are not in the `llvm`

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 207851. Charusso marked 8 inline comments as done. Charusso added a comment. - Fix. - Document `NoteTag`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63915/new/ https://reviews.llvm.org/D63915 Files: clang/include/clang/StaticAnalyzer/Checkers

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 5 inline comments as done. Charusso added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:98-100 +// The APIModeling package is for checkers that model APIs. These checkers are +// always turned on; this package is intended for

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 207862. Charusso marked 12 inline comments as done. Charusso added a comment. - More fix. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63915/new/ https://reviews.llvm.org/D63915 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td c

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks for the reviews! The remaining question is: do we want to use `Optional<>` in the `CallDescriptionMap::lookup()`? Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:98-100 +// The APIModeling package is for checkers that model

[PATCH] D64153: [analyzer] exploded-graph-rewriter: Add a grayscale mode.

2019-07-03 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. Well, it is always awesome to think about the others. Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64153/new/ https://reviews.llvm.org/D64153 _

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 207939. Charusso marked 9 inline comments as done. Charusso added a comment. - Done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63915/new/ https://reviews.llvm.org/D63915 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td clang/

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks for the reviews! In D63915#1569410 , @Szelethus wrote: > This checker isn't in alpha -- did you evaluate it on LLVM? Other than that, > looks great! Yes, it is made for LLVM and tested out 4 times. Thanks! CHANGES SIN

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-03 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365103: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of… (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed p

[PATCH] D64263: [analyzer] exploded-graph-rewriter: Implement a single-path mode.

2019-07-05 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. Smart move! The left-most usually the shortest path, but what if not? I would calculate the length, other than that, cool. Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION http

[PATCH] D64264: [analyzer] exploded-graph-rewriter: Implement a topology-only mode.

2019-07-05 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. May you would remove the "Program points:" part as we only have that, but I think we have enough space for that tiny note. Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION http

[PATCH] D64270: [analyzer][NFC] Prepare visitors for different tracking kinds

2019-07-06 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. Document!!4!44! It is great you have started to limit the notes, thanks! Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:110 + ConditionTracking +}; + What about

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added reviewers: NoQ, ravikandhadai. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun, mgorny. It models the LLVM casts: - `cast<>` - `

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked an inline comment as done. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:175 + else*/ +Param = CE->getArg(0); + This CXXMemberCallExpr business is necessary? I am not sure as I have not see

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks! My mind was really set to actually model these with `classof()`, whoops. Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:25-27 + using CastCheck = + std::function; NoQ wrote: > Kinda nice, but a simple

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 208573. Charusso marked 12 inline comments as done. Charusso added a comment. - Fix - New `getNoteTag()` which accepts a plain note. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64374/new/ https://reviews.llvm.org/D64374 Files: clang/include/cl

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 208574. Charusso added a comment. - Fix a typo. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64374/new/ https://reviews.llvm.org/D64374 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td clang/include/clang/StaticAnalyzer/Core/Pat

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 208586. Charusso marked 9 inline comments as done. Charusso added a comment. - Fix. - More tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64374/new/ https://reviews.llvm.org/D64374 Files: clang/include/clang/StaticAnalyzer/Checkers/Checker

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:61 + + return Ty.getAsString(); +} NoQ wrote: > Use after free! `QualType::getAsString()` returns a temporary `std::string`. > You're returning a `StringRef` that

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 208588. Charusso added a comment. - Simplify the new `getNoteTag()`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64374/new/ https://reviews.llvm.org/D64374 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td clang/include/clang/St

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-09 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 208824. Charusso marked 6 inline comments as done. Charusso added a comment. - Move to `apiModeling.llvm`. - Prevent unknown casts. - Refactor. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64374/new/ https://reviews.llvm.org/D64374 Files: clang

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-09 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 2 inline comments as done. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:172 + !CE->getArg(0)->getType()->getPointeeCXXRecordDecl()) +return false; + If we cannot obtain any of the CXXR

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-09 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D64374#1577235 , @NoQ wrote: > Whoops. I underestimated you (: > > Ok, anyway, this was my last comment. Great job! Remember to make sure that > it works on the actual LLVM, not only on tests; mocked-up test headers are > ver

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-09 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 208831. Charusso added a comment. - Add the forgotten `llvm` namespace to the `CallDescription`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64374/new/ https://reviews.llvm.org/D64374 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-09 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D64374#1577266 , @NoQ wrote: > Can you provide more info, eg. the full backtrace? Well, `unique_dyn_cast<>` and `unique_dyn_cast_or_null<>` is used like 20 times in the LLVM codebase, whoops. We want to model it. Full info:

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-09 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks for the review! In D64374#1577279 , @NoQ wrote: > That doesn't sound like it's high on our list. That's not too many times. > Probably very few false positives come out of it. Also modeling smart > pointers is much harde

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-09 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365582: [analyzer] CastValueChecker: Model casts (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.ll

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-09 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 208847. Charusso added a comment. - Add the llvm namespace to the test file. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64374/new/ https://reviews.llvm.org/D64374 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td clang/include/

<    1   2   3   4   5   6   7   >