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

2018-02-09 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL324790: [analyzer] Add missing pre-post-statement callbacks for OffsetOfExpr. (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

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

2018-02-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. All right, i guess we already do have a pair of callbacks for `IntegerLiteral` and it doesn't hurt, especially because here they'd eventually be actually useful. I think it should land, just to

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

2018-02-08 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. @NoQ Sorry to bother you again. It seems that this patch is useless to analyzer temporarily, if you think so, I will abandon it : ). Repository: rC Clang https://reviews.llvm.org/D42300 ___ cfe-commits mailing list

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

2018-02-08 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 133421. MTC added a comment. Herald added a reviewer: george.karpenkov. rebase Repository: rC Clang https://reviews.llvm.org/D42300 Files: lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp lib/StaticAnalyzer/Core/ExprEngine.cpp

[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

[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:

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

2018-01-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. The patch seems correct, but i suspect that your overall approach to the checker you're trying to make is not ideal. `offsetof` returns a concrete value (because, well, symbolic `offsetof`s are not yet supported in the analyzer), and even if you see the concrete value,

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

2018-01-19 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Henry, The patch looks reasonable. I think it can be landed after comments are resolved. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:1497 + ExplodedNodeSet PostVisit; + for (ExplodedNodeSet::iterator i = PreVisit.begin(), e =

[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