[PATCH] D67382: [analyzer] NFC: Move getStmt() and createEndOfPath() out of PathDiagnostic.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 11 11:08:56 PDT 2019


NoQ marked an inline comment as done.
NoQ added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporter.cpp:2185
   } else {
-    assert(ErrorNode);
-    hash.AddPointer(GetCurrentOrPreviousStmt(ErrorNode));
----------------
NoQ wrote:
> Szelethus wrote:
> > Why delete the assert?
> Because it's enforced by the type system these days. This is a method on `PathSensitiveBugReport` that always has an error node, as asserted in its constructor. I should have removed this assert in D66572.
Previously this assert was on the generic `BugReport::Profile` and it was there to state that "either a report has an error node, or a manually set location". Now have a clear separation between path-sensitive and path-insensitive reports in our type system, so it doesn't make sense to enforce this alternative manually.

Also, no, it wasn't failing :)


Repository:
  rC Clang

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

https://reviews.llvm.org/D67382





More information about the cfe-commits mailing list