[PATCH] D41151: [analyzer] Adding LoopContext and improve loop modeling

2017-12-12 Thread Henry Wong via Phabricator via cfe-commits
MTC added inline comments. Comment at: include/clang/Analysis/ProgramPoint.h:619 /// CallExitBegin and CallExitEnd. The following operations occur between the -/// two program points: +/// two preogram points: /// - CallExitBegin A minor typo, it should be 'pro

[PATCH] D37189: Fix an assertion failure that occured when custom 'operator new[]' return non-ElementRegion and 'c++-allocator-inlining' sets true.

2017-12-08 Thread Henry Wong via Phabricator via cfe-commits
MTC marked an inline comment as done. MTC added a comment. Thank you for your constant attention to this problem, Artem. I've updated the diff. As you said, this is a complex problem and look forward to your work on this issue. Repository: rC Clang https://reviews.llvm.org/D37189 ___

[PATCH] D37189: Fix an assertion failure that occured when custom 'operator new[]' return non-ElementRegion and 'c++-allocator-inlining' sets true.

2017-12-08 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 126262. MTC set the repository for this revision to rC Clang. MTC added a comment. Herald added a subscriber: cfe-commits. Use 'return State' instead of 'return nullptr'. Repository: rC Clang https://reviews.llvm.org/D37189 Files: lib/StaticAnalyzer/Checke

[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

2017-11-28 Thread Henry Wong via Phabricator via cfe-commits
MTC marked an inline comment as done. MTC added a comment. Hi dcoughlin, Thank you very much for your help. I have no commit access and hope someone can commit it on my behalf. Thanks a lot! https://reviews.llvm.org/D37187 ___ cfe-commits mailing

[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

2017-11-28 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 124549. MTC added a comment. Update the llvm_unreachable's description of the BlockEntrance-branch from "Unexpected ProgramPoint" to "Unexpected CFG element at front of block". https://reviews.llvm.org/D37187 Files: lib/StaticAnalyzer/Core/PathDiagnostic.cpp

[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

2017-11-25 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 124248. MTC marked an inline comment as done. MTC added a comment. 1.Use the `getAs<>` in the `if` condition. 2.Add an "Unexpected ProgramPoint" assertion to make this patch more complete. https://reviews.llvm.org/D37187 Files: lib/StaticAnalyzer/Core/PathDia

[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

2017-11-21 Thread Henry Wong via Phabricator via cfe-commits
MTC marked an inline comment as done. MTC added inline comments. Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:694 + } else if (Optional BE = P.getAs()) { +CFGElement BlockFront = BE->getBlock()->front(); +if (BlockFront.getKind() == CFGElement::Statement) { ---

[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

2017-11-21 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 123783. MTC added a comment. Herald added subscribers: a.sidorin, rnkovacs. Update diff, use the SourceLocation of the first element of the entered block as the argument of `PathDiagnosticLocation`. https://reviews.llvm.org/D37187 Files: lib/StaticAnalyzer/C

[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

2017-11-07 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. ping? https://reviews.llvm.org/D37187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

2017-11-01 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. ping? Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:651-652 + } else if (StoreSite->getLocation().getAs()) { +os << "Reach the max loop limit."; +os << " Assigning a conjured symbol"; +if (R->canPrintPretty()) { z

[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

2017-10-26 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 120401. MTC marked an inline comment as done. MTC added a comment. Split the long "expected" line into multiple lines. https://reviews.llvm.org/D37187 Files: lib/StaticAnalyzer/Core/PathDiagnostic.cpp test/Analysis/loop-widening-notes.c Index: test/Analy

[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

2017-10-25 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 120265. MTC marked 3 inline comments as done. MTC added a comment. The message about invalidate variable values is temporarily not printed. This work can be done with separate patch. https://reviews.llvm.org/D37187 Files: lib/StaticAnalyzer/Core/PathDiagnost

[PATCH] D31868: [analyzer] Check NULL pointer dereference issue for memset function

2017-10-24 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. > One of the possible improvements for future work here would be to actually > bind the second argument value to the buffer instead of just invalidating it. > Like, after `memset(buf, 0, sizeof(buf))` the analyzer should know that all > values in the `buf` array are `0`. In

<    1   2