- User Since
- Jun 16 2016, 2:39 AM (57 w, 1 d)
Removed REQUIRE ASSERT from test file.
I suspect that the usage of the CFGStmtMap* caused the undefined behaviour since its lifetime was depending on its LocationContext.
In this version the isUnrolledLoopBlock creates the CFGStmtMap based on the CFG of the function which contains the unrolled loop. So the State stores FunctionDecl* instead of CFGStmtMap*.
Adding new block when the loop successor is the ExitBlock.
Test cases updated.
Wed, Jul 19
updated the test files
Thu, Jul 13
Thanks for working on this!
Updates based on comments.
Mon, Jul 10
Just to be clear, both of the columns refer to the number of matches of your matchers right? So for loops that would not be unrolled are skipped.
Updated the patch according to the comments.
Measured the number of matches of the pattern on various projects and it turns out that strict while/do-while patterns - which I'm looking for - are much less common than forStmts.
|Project||# of ForLoop||# of While/DoWhile Loop|
Thu, Jun 29
Bug with nested loops in inlined functions fixed.
Test cases added.
Tue, Jun 27
Updated the check of the blocks of inline analyzed functions using StackFrameContext.
Thu, Jun 22
Just ran clang-format on LoopUnrolling.cpp.
Wed, Jun 21
Answered comments and made changes according to them.
Jun 16 2017
Small update based on comments.
Jun 15 2017
Jun 6 2017
May 28 2017
Some nits added, other than these it looks good to me. Thank you!
Just more one question, I can see 3 different cases how the import returns are handled:
- if(!ToDecl) return nullptr;
- if(!ToDecl && FromDecl) return nullptr;
- no handling: ObjectXY::Create(...Import(FromDecl))
May 16 2017
May 7 2017
Thanks for the fast review!
May 6 2017
Apr 18 2017
Apr 15 2017
Mar 31 2017
LGTM, thank you (again)!
Thank you for working on that, Artem!
The changes look good, just one comment about that suspicious remove.
Mar 20 2017
Nits resolved, dependency added in order to not to conflict the 2 patches.
Test case added.
Mar 12 2017
Mar 7 2017
I guess the solution is to come up with more detailed heuristics to figure out which methods are safe and which aren't - either larger lists of methods, or regex-based analysis over method names. Would you be willing to come up with those in a follow-up patch? We may also have a look eventually, because we believe this checker is useful :)
Done in this diff:
- branch rebase
- check comments in the test file separated to lines (only notes with the same messages are in the same line)
Feb 13 2017
Small infotext added and test cases updated. (More loop test to make sure the checkEndFunction workaround works fine.)
Use one ToExpr and FromExpr in the patch.
Check for unsuccessful import added.
Feb 9 2017
additional small test case added
Feb 8 2017
thank you for the review and the advice!
Feb 6 2017
CheckPointerEscape callback removed since checkRegionChanges handle all the necessary cases.
Member MoveStmt removed from RegionState.
+Some typo fixes in comments.
Dec 25 2016
The requested changes have been made.
Some more refactor on the Case2 since it is the same as the LHS/RHS case. Moved more common statements out of the branch (Case2-3) for better readabilty. (And less code duplication.)
Test cases updated.
Some invalidation moved to checkRegionChanges callback.
Missing feature added: do not report an SubRegion if any of its SuperRegion is already reported
Dec 17 2016
Minor changes to improve the readability of the code according to comments.
Dec 13 2016
What is your opinion about the new results? I hope the checker can make it into 4.0.
I wasn't able to find time for this checker the last few weeks, but my schedule became much lighter and I plan to commit the required changes (and a bugfix) next week. Starting from next week I can work on the checker on a daily basis. Hopefully it can make it into 4.0.
Oct 6 2016
Oct 4 2016
At first I was not able to reproduce it. Then I realized it was my foul because I used the analyzer without the core checkers in this case. Sorry for the false positive.
Note message checks added to testfiles.
Oct 2 2016
- Some refactor based on comments.
- Updated testfiles.
Sep 30 2016
Updates based on comments (the testfile note comments will be added in the next commit)
Sep 20 2016
In order to decrease false positive rate, the bitmask specific checker part investigate only the enumconstans which was initilized by a literal. (If this is too strong it can be modified)
Sep 6 2016
removed empty file which was added by mistake
Sep 5 2016
cast to dyn-cast change in order to fix a bug, changes based on comments