[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)
Endre Fülöp via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 2 05:19:52 PDT 2023
================
@@ -25,19 +25,36 @@
using namespace clang;
using namespace ento;
+
namespace {
+
class InvalidPtrChecker
: public Checker<check::Location, check::BeginFunction, check::PostCall> {
private:
- BugType BT{this, "Use of invalidated pointer", categories::MemoryError};
+ static const BugType *InvalidPtrBugType;
+ // For accurate emission of NoteTags, the BugType of this checker should have
+ // a unique address.
+ void InitInvalidPtrBugType() {
+ InvalidPtrBugType = new BugType(this, "Use of invalidated pointer",
+ categories::MemoryError);
+ }
----------------
gamesh411 wrote:
incorporated this in 190d2409b89147b8c2c9c2e8d0f96ec07df9e3fc
https://github.com/llvm/llvm-project/pull/67663
More information about the cfe-commits
mailing list