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

Aleksei Sidorin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 19 07:21:34 PST 2018

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 = PreVisit.end();
+           i != e; ++i) {
Could you C++11-fy this loop?

Comment at: test/Analysis/offsetofexpr-callback.c:3
+#include <stddef.h>
Answering your question, we should put the declaration into system-header-simulator.h.

Comment at: test/Analysis/offsetofexpr-callback.c:7
+    char c;
+    double d;
This decl seems unused. Should we remove it?

  rC Clang


More information about the cfe-commits mailing list