[clang] [analyzer] Implemented the DanglingPtrDeref checker to detect use-after-scope lifetime errors (PR #209278)
Benedek Kaibas via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 14 05:31:22 PDT 2026
================
@@ -0,0 +1,95 @@
+#include "LifetimeModeling.h"
+#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
+#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
+#include "clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h"
+#include "clang/StaticAnalyzer/Core/Checker.h"
+#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
+
+using namespace clang;
+using namespace ento;
+
+namespace {
+class ReportDanglingPtrDeref : public Checker<check::Location> {
----------------
benedekaibas wrote:
Applied changes here: [f97acf3](https://github.com/llvm/llvm-project/pull/209278/commits/f97acf33bb22242727237d25a0bc58158daf4aec)
https://github.com/llvm/llvm-project/pull/209278
More information about the cfe-commits
mailing list