steakhal added a comment.

Looks great!
Thanks for your hard work on this topic @Szelethus.



================
Comment at: clang/lib/Analysis/CFG.cpp:5908-5909
 
+void CFG::dump(bool ShowColors) const { dump(LangOptions{}, ShowColors); }
+
 /// print - A simple pretty printer of a CFG that outputs to an ostream.
----------------
How are these `dump()` changes related?


================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1968
+static const Expr *peelOffOuterExpr(const Expr *Ex, const ExplodedNode *N) {
+
   Ex = Ex->IgnoreParenCasts();
----------------
extra blank line


================
Comment at: clang/test/Analysis/track-control-dependency-conditions.cpp:1006
+  x = nullptr;              // expected-note {{Null pointer value stored to 
'x'}}
+  if (auto e = couldFail()) // expected-note {{Taking true branch}}
+    *x = 5;                 // expected-warning {{Dereference of null pointer 
(loaded from variable 'x') [core.NullDereference]}}
----------------
Please also have a `c++17` init if statement.


================
Comment at: clang/test/Analysis/track-control-dependency-conditions.cpp:1036
+  x = nullptr;        // expected-note {{Null pointer value stored to 'x'}}
+  if (!alwaysFalse()) // expected-note {{Taking true branch}}
+    *x = 5;           // expected-warning {{Dereference of null pointer 
(loaded from variable 'x') [core.NullDereference]}}
----------------
What if this expression is enclosed by a logical operator such as `&&`?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116597/new/

https://reviews.llvm.org/D116597

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D116597: [analyzer]... Kristóf Umann via Phabricator via cfe-commits
    • [PATCH] D116597: [anal... Balázs Benics via Phabricator via cfe-commits

Reply via email to