[PATCH] D64272: [analyzer] Note last writes to a condition only in a nested stackframe

2019-07-17 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 210340. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64272/new/ https://reviews.llvm.org/D64272 Files: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp

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

2019-07-17 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 210337. Szelethus marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64270/new/ https://reviews.llvm.org/D64270 Files: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h

[PATCH] D64287: [analyzer] Track the right hand side of the last store regardless of its value

2019-07-17 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 210333. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64287/new/ https://reviews.llvm.org/D64287 Files: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp clang/test/Analysis/track-control-dependency-conditions.cpp

[PATCH] D64232: [analyzer] Prune calls to functions with linear CFGs that return a non-zero constrained value

2019-07-17 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 210330. Szelethus added a comment. Rebase on top master. Putting this on the bottom of the patch stack because this really deserves it's own analysis. (Side note, I completely messed up like ~40 hrs worth of analysis because I didn't check which branches

[PATCH] D63279: [Analyzer] Unroll for-loops where the upper boundary is a variable with know value

2019-07-17 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I think you forgot to remove `/* */` and clang formatting before uploading the patch. Comment at: lib/StaticAnalyzer/Core/LoopUnrolling.cpp:214-216 + const Expr *BoundExpr = CondOp->getLHS()->IgnoreParenImpCasts(); + if (BoundExpr ==

[PATCH] D59555: [analyzer] Add yaml parser to GenericTaintChecker

2019-07-17 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Hmm, okay, so we convert `-1` from the config file to `UINT_MAX` in the code, I like it! I wrote a couple nits but they really are just that. In general, for each different error message, a different test case would be great. Comment at:

[PATCH] D59555: [analyzer] Add yaml parser to GenericTaintChecker

2019-07-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Starting to look real good! Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:807 + "", + Released>, + ]>, We mark options that are not yet ready for used with `InAlpha`, rather then

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D64454#1587102 , @aaron.ballman wrote: > I think this looks reasonable to me, though I am still not certain if the > relative path in the python script will work with both the svn in-tree > directory layout as well as the

[PATCH] D64274: [analyzer] VirtualCallChecker overhaul.

2019-07-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Also, shouldn't we add this to the release notes? In general, it's be around time to sort it out (might do that myself before the new branch). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64274/new/ https://reviews.llvm.org/D64274

[PATCH] D62525: [Analyzer] Add new visitor to the iterator checkers

2019-07-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1099 reportOutOfRangeBug("Iterator decremented ahead of its valid range.", LHS, -C, N); +C, N, Pos, false); }

[PATCH] D63279: [Analyzer] Unroll for-loops where the upper boundary is a variable with know value

2019-07-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus requested changes to this revision. Szelethus added inline comments. This revision now requires changes to proceed. Comment at: lib/StaticAnalyzer/Core/LoopUnrolling.cpp:214-216 + const Expr *BoundExpr = CondOp->getLHS()->IgnoreParenImpCasts(); + if (BoundExpr ==

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I don't see obvious red flags strictly regarding the analyzer! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64454/new/ https://reviews.llvm.org/D64454 ___ cfe-commits

[PATCH] D64274: [analyzer] VirtualCallChecker overhaul.

2019-07-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:562 + HelpText<"Check virtual function calls during construction/destruction">, Documentation; Szelethus wrote: > Szelethus wrote: > >

[PATCH] D64274: [analyzer] VirtualCallChecker overhaul.

2019-07-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D64274#1574086 , @NoQ wrote: > Hmm, wait, i don't really break backwards compatibility. Fridays... //Ackchyually//, it doesn't per se break anything, but will result in CodeChecker no longer enabling

[PATCH] D64232: [analyzer] Prune calls to functions with linear CFGs that return a non-zero constrained value

2019-07-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added inline comments. Comment at: clang/test/Analysis/track-control-dependency-conditions.cpp:185 return true; return coin(); // tracking-note{{Returning value}} } NoQ wrote: > Szelethus wrote: > >

[PATCH] D64232: [analyzer] Prune calls to functions with linear CFGs that return a non-zero constrained value

2019-07-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: clang/test/Analysis/uninit-vals.c:181 void testUseHalfPoint() { - struct Point p = getHalfPoint(); // expected-note{{Calling 'getHalfPoint'}} - //

[PATCH] D64271: [analyzer] Don't track the right hand side of the last store for conditions

2019-07-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D64271#1576872 , @NoQ wrote: > I'd rather not abandon this patch, because it looks like a strict improvement > over the lack of condition tracking, and it might as well still be an > improvement over "zealous" condition

[PATCH] D64272: [analyzer] Note last writes to a condition only in a nested stackframe

2019-07-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Gentle ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64272/new/ https://reviews.llvm.org/D64272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D64287: [analyzer] Track the right hand side of the last store regardless of its value

2019-07-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added a comment. Would you say it's good to go? :) Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1436-1437 -} -ReturnVisitor::addVisitorIfNecessary(StoreSite, InitE->IgnoreParenCasts(), -

[PATCH] D64232: [analyzer] Prune calls to functions with linear CFGs that return a non-zero constrained value

2019-07-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Gentle ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64232/new/ https://reviews.llvm.org/D64232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D64628: [CrossTU] Test change only: improve ctu-main.c

2019-07-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Hmmm, did this result in an assertion? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64628/new/ https://reviews.llvm.org/D64628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D64638: [CrossTU] Fix plist macro expansion if macro in other file.

2019-07-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64638/new/ https://reviews.llvm.org/D64638

[PATCH] D64635: [CrossTU] Added CTU argument to diagnostic consumer create fn.

2019-07-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added reviewers: NoQ, Szelethus. Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64635/new/ https://reviews.llvm.org/D64635

[PATCH] D64543: [Docs] Add standardized header links to analyzer doc

2019-07-11 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. Woohoo! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64543/new/ https://reviews.llvm.org/D64543

[PATCH] D64494: [analyzer]Add user docs rst

2019-07-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Np, please leave it in! :) Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64494/new/ https://reviews.llvm.org/D64494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D64494: [analyzer]Add user docs rst

2019-07-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I guess any time we modify analyzer stuff, we may invite the main analyzer developers to the patch review as well. In any case, LGTM, if this really is a beginning of porting the already existing documentation to sphinx. Repository: rL LLVM CHANGES SINCE LAST

[PATCH] D64274: [analyzer] VirtualCallChecker overhaul.

2019-07-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Please know that I'm currently out of town, so it'll be a while before I can formally accept. Its on top of my list when I get home though! :^) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64274/new/ https://reviews.llvm.org/D64274

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Just thinking aloud! We were tinkering with the idea of a checker creator script similar to what clang-tidy has, that could help on this potentially. Is generating the rst code with Tblgen a feasable approach? At first glance, it sounds like a nightmare to

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

2019-07-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:279 + HelpText<"Model implementation of custom RTTIs">, + Documentation; + This checker only does modeling, but isn't hidden. Should we hide it? CHANGES

[PATCH] D64274: [analyzer] VirtualCallChecker overhaul.

2019-07-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D64274#1574118 , @NoQ wrote: > Mmm, no, not really; it seems that if i introduce a checker dependency, i > also have to put the option onto the base checker, otherwise the checker name > wouldn't match when i do >

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/include/clang/Analysis/Analyses/Dominators.h:230 + + virtual void releaseMemory() { +PostDomTree.releaseMemory(); kuhar wrote: > If the virtual function is introduced by ManagesAnalysis, isn't it better to

[PATCH] D63279: [Analyzer] Unroll for-loops where the upper boundary is a variable with know value

2019-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Core/LoopUnrolling.cpp:214-216 + const Expr *BoundExpr = CondOp->getLHS()->IgnoreParenImpCasts(); + if (BoundExpr == Matches[0].getNodeAs("boundVarOperand")) +BoundExpr =

[PATCH] D64274: [analyzer] VirtualCallChecker overhaul.

2019-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus requested changes to this revision. Szelethus added a comment. This revision now requires changes to proceed. I happen to have very recent analyses on a couple projects, I'll throw this in: LLVM+Clang+Clang-tools-extra

[PATCH] D64232: [analyzer] Prune calls to functions with linear CFGs that return a non-zero constrained value

2019-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 208276. Szelethus added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64232/new/ https://reviews.llvm.org/D64232 Files: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp

[PATCH] D64272: [analyzer] Note last writes to a condition only in a nested stackframe

2019-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 208275. Szelethus added a comment. Rebase after D64271 being abandoned. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64272/new/ https://reviews.llvm.org/D64272 Files:

[PATCH] D64271: [analyzer] Don't track the right hand side of the last store for conditions

2019-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus abandoned this revision. Szelethus added a comment. You're right. If condition tracking only adds necessary information anyways, this shouldn't hurt that much anyways. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64271/new/

[PATCH] D64287: [analyzer] Track the right hand side of the last store unconditionally

2019-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, rnkovacs, baloghadamsoftware, Charusso. Szelethus added a project: clang. Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. The following code snippet

[PATCH] D64272: [analyzer] Note last writes to a condition only in a nested stackframe

2019-07-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, rnkovacs, dcoughlin, Charusso, baloghadamsoftware. Szelethus added a project: clang. Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. Szelethus added a

[PATCH] D64271: [analyzer] Don't track the right hand side of the last store for conditions

2019-07-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, baloghadamsoftware, rnkovacs, Charusso, dcoughlin. Szelethus added a project: clang. Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. Szelethus added a

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

2019-07-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, rnkovacs, Charusso, baloghadamsoftware, dcoughlin. Szelethus added a project: clang. Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. When we're

[PATCH] D64232: [analyzer] Prune calls to functions with linear CFGs that return a non-zero constrained value

2019-07-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added a comment. In D64232#1570938 , @NoQ wrote: > I'm slightly worried that we're fighting the symptoms rather than the root > cause here: why were these values tracked that far in the first place

[PATCH] D63538: [CFG] Add a new function to get the proper condition of a CFGBlock

2019-07-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D63538#1571451 , @Szelethus wrote: > Since the followup patches test this roughly anyways, and the fact that the > AST's lifetime ends right after the CFG's construction makes the remaining > tests pretty much pointless, if

[PATCH] D63538: [CFG] Add a new function to get the proper condition of a CFGBlock

2019-07-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D63538#1571418 , @RKSimon wrote: > @Szelethus This is causing problems on windows buildbots > http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast > - revert? Apologies, I thought my followup

[PATCH] D63642: [analyzer] Add a debug analyzer config to place an event for each tracked condition

2019-07-05 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb55745606fa6: [analyzer] Add a debug analyzer config to place an event for each tracked… (authored by Szelethus). Changed prior to commit: https://reviews.llvm.org/D63642?vs=205966=208171#toc

[PATCH] D62883: [analyzer] Track terminator conditions on which a tracked expressions depends

2019-07-05 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365207: [analyzer] Track terminator conditions on which a tracked expression depends (authored by Szelethus, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-07-05 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Szelethus marked 11 inline comments as done. Closed by commit rL365197: [analyzer][IDF] Add a control dependency calculator + a new debug checker (authored by Szelethus, committed by ). Herald added a project: LLVM. Herald

[PATCH] D62611: [analyzer][Dominators] Add unittests

2019-07-05 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365179: [analyzer][Dominators][NFC] Add unit tests (authored by Szelethus, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63538: [CFG] Add a new function to get the proper condition of a CFGBlock

2019-07-05 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365177: [CFG] Add a new function to get the proper condition of a CFGBlock (authored by Szelethus, committed by ). Changed prior to commit: https://reviews.llvm.org/D63538?vs=207904=208130#toc

[PATCH] D64232: [analyzer] Prune calls to functions with linear CFGs that return a non-zero constrained value

2019-07-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, rnkovacs, baloghadamsoftware, dcoughlin, Charusso. Szelethus added a project: clang. Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. During the

[PATCH] D62883: [analyzer] Track terminator conditions on which a tracked expressions depends

2019-07-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 208084. Szelethus marked 6 inline comments as done. Szelethus added a comment. - Add two more test cases when a "Returning value" note is meaningful, and one where it's not - Fix inlines! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62883/new/

[PATCH] D63920: [CTU] Add support for virtual functions

2019-07-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63920/new/ https://reviews.llvm.org/D63920

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

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. This checker isn't in alpha -- did you evaluate it on LLVM? Other than that, looks great! Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1119 - const T *lookup(const CallEvent ) const { + Optional lookup(const

[PATCH] D63538: [CFG] Add a new function to get the proper condition of a CFGBlock

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 207904. Szelethus added a comment. Add one more assert to `GetExprText`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63538/new/ https://reviews.llvm.org/D63538 Files: clang/include/clang/Analysis/CFG.h clang/lib/Analysis/CFG.cpp

[PATCH] D63538: [CFG] Add a new function to get the proper condition of a CFGBlock

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 207902. Szelethus added a comment. - Bail out if the actual terminator isn't a branch - Bail out if the number of successors is less than 2 - LLVM-ify the code as suggested! - Add some unit tests (I mean, you can kinda see how it was duct taped together,

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

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. BRILLIANT Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64153/new/ https://reviews.llvm.org/D64153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus 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

[PATCH] D63538: [CFG] Add a new function to get the proper condition of a CFGBlock

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 207833. Szelethus retitled this revision from "[analyzer][CFG] Return the correct terminator condition" to "[CFG] Add a new function to get the proper condition of a CFGBlock". Szelethus edited the summary of this revision. Szelethus added a comment.

[PATCH] D63920: [CTU] Add support for virtual functions

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D63920#1568269 , @martong wrote: > So, we would like to have a test which indicates that we can inline a virtual > function from another TU. These tests are at line 110 and 111. > > At line 113 we would like to have a test

[PATCH] D63538: [analyzer][CFG] Return the correct terminator condition

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus reopened this revision. Szelethus added a comment. This revision is now accepted and ready to land. Causes crashes on Sema. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63538/new/ https://reviews.llvm.org/D63538

[PATCH] D63538: [analyzer][CFG] Return the correct terminator condition

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365036: [analyzer][CFG] Return the correct terminator condition (authored by Szelethus, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63538: [analyzer][CFG] Return the correct terminator condition

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus requested review of this revision. Szelethus added a comment. This revision is now accepted and ready to land. Seems fine over here let's see what happens if I try to land it? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63538/new/ https://reviews.llvm.org/D63538

[PATCH] D62611: [analyzer][Dominators] Add unittests

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 207759. Szelethus added a comment. Fixes according to reviewer comments! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62611/new/ https://reviews.llvm.org/D62611 Files: clang/unittests/Analysis/CFGBuildResult.h

[PATCH] D62551: [analyzer][Dominator] Add post dominator tree builder for the CFG + a debug checker

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365028: [analyzer][Dominator] Add post dominators to CFG + a new debug checker (authored by Szelethus, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

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

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. This checker seems to only check LLVM functions, but doesn't check whether these methods lie in the LLVM namespace. Is this intended? Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:98-100 +// The APIModeling package is for

[PATCH] D62507: [Dominators] PR42041: Skip nullpointer successors

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365026: [Dominators] PR42041: Skip nullpointer successors (authored by Szelethus, committed by ). Changed prior to commit: https://reviews.llvm.org/D62507?vs=201994=207753#toc Repository: rL LLVM

[PATCH] D59798: [analyzer] Add analyzer option to limit the number of imported TUs

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: test/Analysis/ctu-import-threshold.c:1-5 +// Ensure analyzer option 'ctu-import-threshold' is a recognized option. +// +// RUN: %clang_cc1 -analyze -analyzer-config ctu-import-threshold=30 -verify %s +// +// expected-no-diagnostics

[PATCH] D63920: [CTU] Add support for virtual functions

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D63920#1568031 , @martong wrote: > In D63920#1566035 , > @baloghadamsoftware wrote: > > > Try to set analyzer option `IPAMode` to something different from its > > default value which

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

2019-07-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I'd love to chip in later, if you don't mind, but here is just a couple things that caught my mind that I'd like to share before falling asleep ;) Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:98-100 +// The APIModeling package

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-07-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Can you formally accept then? :) (I'll address inlines before commiting of course!) In D62619#1566693 , @kuhar wrote: > The non-static-analyzer bits look good to me, I added a few nits. Thank you! This part of the project

[PATCH] D63538: [analyzer][CFG] Return the correct terminator condition

2019-07-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus planned changes to this revision. Szelethus added a comment. Something's off. `test/Analysis/edges-new.mm` fails, but I don't remember any test failures at home -- I'll investigate. Before this patch: F9448950: image.png After this patch: F9448940:

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-07-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Gentle ping :^) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62619/new/ https://reviews.llvm.org/D62619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D64030: [analyzer] Support kfree in MallocChecker

2019-07-01 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. Nice. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64030/new/ https://reviews.llvm.org/D64030 ___ cfe-commits mailing list

[PATCH] D62611: [analyzer][Dominators] Add unittests

2019-06-25 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: clang/unittests/Analysis/CFGDominatorTree.cpp:22-32 +template struct FindStmt { + bool operator()(const CFGElement ) { +if (auto S = E.getAs()) + return isa(S->getStmt()); +

[PATCH] D62883: [analyzer] Track terminator conditions on which a tracked expressions depends

2019-06-25 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added a comment. I usually do the final update right before commiting. There still are non-accepted dependencies, who knows what'll happen. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:157

[PATCH] D62883: [analyzer] Track terminator conditions on which a tracked expressions depends

2019-06-21 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: clang/test/Analysis/track-control-dependency-conditions.cpp:1-8 +// RUN: %clang_analyze_cc1 %s -verify -DTRACKING_CONDITIONS \ +// RUN: -analyzer-config track-conditions=true \ +// RUN:

[PATCH] D62883: [analyzer] Track terminator conditions on which a tracked expressions depends

2019-06-21 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Woohoo! Thanks for everything, this is the most fun I've had working on this project! Let's wait for @xazax.hun to have the final say. In D62883#1554494 , @NoQ wrote: > It should be pretty easy to implement, just add your new

[PATCH] D62883: [analyzer] Track terminator conditions on which a tracked expressions depends

2019-06-21 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D62883#1554339 , @NoQ wrote: > In D62883#1553248 , @Szelethus wrote: > > > - Add a `TODO:` in `trackExpressionValue` about maybe tracking conditions > > to all bug locations, rather

[PATCH] D63642: [analyzer] Add a debug analyzer config to place an event for each tracked condition

2019-06-21 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, baloghadamsoftware, xazax.hun, Charusso, rnkovacs, dcoughlin. Szelethus added a project: clang. Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. Exactly what it

[PATCH] D62883: [analyzer] Track conditions of terminator statements on which the reported node depends on

2019-06-21 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 205954. Szelethus added a comment. - Collect only `ExplodedNode`s. Lesson learned! - Add a `TODO:` in `trackExpressionValue` about maybe tracking conditions to all bug locations, rather than only for tracked variables. CHANGES SINCE LAST ACTION

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-06-20 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 205917. Szelethus added a comment. Rebase on previous patches. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62619/new/ https://reviews.llvm.org/D62619 Files: clang/include/clang/Analysis/Analyses/Dominators.h

[PATCH] D62611: [analyzer][Dominators] Add unittests

2019-06-20 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Gentle ping :^) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62611/new/ https://reviews.llvm.org/D62611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D62883: [analyzer] Track conditions of terminator statements on which the reported node depends on

2019-06-20 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 205916. Szelethus marked an inline comment as done. Szelethus added a comment. - Now using `CFGBlock::getTerminatorConditionExpr()` - Uniqueing already tracked conditions as an (`Expr`, `ExplodedNode`) pair instead of on `Expr` - Add a `TODO:` about

[PATCH] D63538: [analyzer][CFG] Return the correct terminator condition

2019-06-20 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 205909. Szelethus added a comment. Addressing reviewer feedback! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63538/new/ https://reviews.llvm.org/D63538 Files: clang/include/clang/Analysis/CFG.h clang/lib/Analysis/CFG.cpp Index:

[PATCH] D63538: [analyzer][CFG] Return the correct terminator condition

2019-06-19 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, a_sidorin, baloghadamsoftware, rnkovacs, dcoughlin. Szelethus added a project: clang. Herald added subscribers: cfe-commits, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. For

[PATCH] D62899: [analyzer][UninitializedObjectChecker] Mark uninitialized regions as interesting.

2019-06-19 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 205511. Szelethus added a comment. Added a proper testfile. The only downside of it, is that it doesn't test anything. Literally nothing would change is I didn't mark the fields interesting. I'll take this back to the drawing board. CHANGES SINCE LAST

[PATCH] D62688: [Analyzer] Iterator Checkers - Model `empty()` method of containers

2019-06-18 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1741-1763 +bool isContainer(const CXXRecordDecl *CRD) { + if (!CRD) +return false; + + for (const auto *Decl : CRD->decls()) { +const auto *TD = dyn_cast(Decl); +if (!TD)

[PATCH] D62688: [Analyzer] Iterator Checkers - Model `empty()` method of containers

2019-06-18 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Hmm, an idea just popped into my head. I'm not sure whether we have a single checker that does so much complicated (and totally awesome) modeling as `IteratorChecker`. What do you think about a debug checker similar to `debug.ExprInspection`, like

[PATCH] D62883: [analyzer] Track conditions of terminator statements on which the reported node depends on

2019-06-17 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 3 inline comments as done. Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1609-1613 + if (B->rbegin()->getKind() != CFGElement::Kind::Statement) +return nullptr; + + // This should be the condition of the

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-06-17 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/include/clang/Analysis/Analyses/Dominators.h:51 + CFGDominatorTreeImpl(CFG *cfg) { +buildDominatorTree(cfg); + } kuhar wrote: > DomTree has a constructor that runs the builder -- why not use it directly?

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-06-17 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 205109. Szelethus marked 7 inline comments as done. Szelethus added a comment. Fixes according to reviewer comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62619/new/ https://reviews.llvm.org/D62619 Files:

[PATCH] D62883: [analyzer] Track conditions of terminator statements on which the reported node depends on

2019-06-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D62883#1545343 , @Charusso wrote: > In D62883#1545341 , @Szelethus wrote: > > > In D62883#1545324 , @Charusso > > wrote: > > > > > As @NoQ

[PATCH] D62883: [analyzer] Track conditions of terminator statements on which the reported node depends on

2019-06-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 204980. Szelethus added a comment. Add another `RUN:` line to see more clearly the effects of this patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62883/new/ https://reviews.llvm.org/D62883 Files:

[PATCH] D62883: [analyzer] Track conditions of terminator statements on which the reported node depends on

2019-06-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added a comment. In D62883#1545324 , @Charusso wrote: > Hey! It is a cool patch as the smallest the scope the better to understand > what is going on. I like the direction, but we saw with @NoQ, we

[PATCH] D62883: [analyzer] Track conditions of terminator statements on which the reported node depends on

2019-06-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 8 inline comments as done. Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1850 + +return const_cast(Node->getLocationContext() +->getAnalysisDeclContext()->getCFGStmtMap()->getBlock(S));

[PATCH] D62883: [analyzer] Track conditions of terminator statements on which the reported node depends on

2019-06-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 204973. Szelethus added a comment. - Rebase on the rest of the patches - Make `TrackControlDependencyCondBRVisitor` local to `BugReporterVisitors.cpp` - Hide the current implementation behind the off-by-default analyzer config `"track-conditions"` - Add

[PATCH] D62619: [analyzer][Dominators] Add a control dependency calculator + a new debug checker

2019-06-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 204972. Szelethus retitled this revision from "[analyzer][Dominators] Add a control dependency tree builder + a new debug checker" to "[analyzer][Dominators] Add a control dependency calculator + a new debug checker". Szelethus edited the summary of this

[PATCH] D62883: [analyzer] Track conditions of terminator statements on which the reported node depends on

2019-06-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:157 + /// Conditions we're already tracking. + llvm::SmallPtrSet TrackedConditions; + xazax.hun wrote: >

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

2019-06-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: cfe/trunk/test/Analysis/inlining/placement-new-fp-suppression.cpp:16 + +typedef unsigned long uintptr_t; + hintonda wrote: > I don't believe this is really ever portable, but definitely not on 64 bit > Windows where

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

2019-06-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: cfe/trunk/test/Analysis/inlining/placement-new-fp-suppression.cpp:16 + +typedef unsigned long uintptr_t; + Szelethus wrote: > hintonda wrote: > > I don't believe this is really ever portable, but definitely not on 64

[PATCH] D62899: [analyzer][UninitializedObjectChecker] Mark uninitialized regions as interesting.

2019-06-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D62899#1544630 , @NoQ wrote: > I don't remember what exactly does `markInteresting()` do and these tests > don't really convince me that it does anything at all. Halp? >.< Damnit, forgot my actual test file in the office

  1   2   3   4   5   6   >