[PATCH] D45491: [analyzer] Do not invalidate the `this` pointer.

2018-04-11 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 142026. MTC marked 2 inline comments as done. MTC added a comment. - Move the `CXXThisRegion`'s check to `LoopWidening.cpp` - Use `isa(R)` instead of `CXXThisRegion::classof(R)`. Repository: rC Clang https://reviews.llvm.org/D45491 Files: lib/StaticAnalyze

[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-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-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-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-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] D42106: [analyzer] Remove the useless method declararion 'BugReporter::RemoveUnneededCalls()'.

2018-01-16 Thread Henry Wong via Phabricator via cfe-commits
MTC created this revision. MTC added reviewers: NoQ, dcoughlin, xazax.hun. Herald added subscribers: cfe-commits, a.sidorin, rnkovacs, szepet. MTC retitled this revision from "[analyzer] Remove the useless method declararion 'BugReporter::RemoveUnneedCalls()'." to "[analyzer] Remove the useless m

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

2018-01-17 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. In https://reviews.llvm.org/D37189#979795, @NoQ wrote: > Oh well, i guess i covered this in my recent patches anyway (esp. > r322787/https://reviews.llvm.org/D41406). Sorry, i just fixed everything > differently and it became unclear how to integrate your patch into the who

[PATCH] D42300: [Analyzer] Add PreStmt and PostStmt callbacks for OffsetOfExpr

2018-01-19 Thread Henry Wong via Phabricator via cfe-commits
MTC created this revision. MTC added reviewers: NoQ, a.sidorin, dcoughlin. Herald added subscribers: cfe-commits, szepet, xazax.hun. PreStmt and PostStmt callbacks for OffsetOfExpr are necessary to implement `Cert ARR39-C: Do not add or subtract a scaled integer to a pointer`. And should I defin

[PATCH] D42300: [Analyzer] Add PreStmt and PostStmt callbacks for OffsetOfExpr

2018-01-20 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 130753. MTC added a comment. - Use C++11 range-based for loop to traverse ExplodedNodeSet. - Define the macro `offsetof` in `system-header-simulator.h`. Repository: rC Clang https://reviews.llvm.org/D42300 Files: lib/StaticAnalyzer/Checkers/AnalysisOrderCh

[PATCH] D42300: [Analyzer] Add PreStmt and PostStmt callbacks for OffsetOfExpr

2018-01-20 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. In https://reviews.llvm.org/D42300#982187, @NoQ wrote: > My intuition suggests that this checker shouldn't be path-sensitive; our > path-sensitive analysis does very little to help you with this particular > checker, and you might end up with a much easier and more reliable

[PATCH] D42785: [Analyzer] Fix a typo in `ExprEngine::VisitMemberExpr`

2018-02-01 Thread Henry Wong via Phabricator via cfe-commits
MTC created this revision. MTC added reviewers: NoQ, dcoughlin. Herald added subscribers: cfe-commits, a.sidorin, szepet, xazax.hun. Herald added a reviewer: george.karpenkov. MTC edited the summary of this revision. `VisitCommonDeclRefExpr()` should accept the ExplodedNode in `CheckedSet` as an

[PATCH] D42785: [Analyzer] Fix a typo in `ExprEngine::VisitMemberExpr`

2018-02-01 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. In https://reviews.llvm.org/D42785#995211, @NoQ wrote: > Ew. So it means that checker transitions are currently discarded. Great > catch. I guess we don't use this functionality yet, so we can't test it, but > the fix should definitely go in. You are right, that's why I d

<    1   2