[PATCH] D158156: [analyzer] Add C++ array delete checker

Discookie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 18 01:42:06 PDT 2023


Discookie marked 6 inline comments as done.
Discookie added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/CXXDeleteChecker.cpp:220
                              N->getLocationContext());
-  return std::make_shared<PathDiagnosticEventPiece>(Pos, OS.str(), true);
+  return std::make_shared<PathDiagnosticEventPiece>(Pos, OS.str(), /*addPosRange=*/true);
+}
----------------
steakhal wrote:
> We should assert that this visitor always adds a Note. In other words, that it must find the Stmt where the derived->base conversion happened. If ever that's not true, we have a bug.
Can't do that just yet as casts in the form of `Derived &d = ...; Base &b = d;` is not supported.


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

https://reviews.llvm.org/D158156



More information about the cfe-commits mailing list