================
@@ -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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to