[clang] [analyzer] Detect dangling pointers passed to function calls (PR #211045)

Benedek Kaibas via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 22 03:19:13 PDT 2026


================
@@ -48,12 +50,24 @@ void DanglingPtrDeref::checkLocation(SVal Loc, bool IsLoad, const Stmt *S,
   }
 }
 
+void DanglingPtrDeref::checkPreCall(const CallEvent &Call,
+                                    CheckerContext &C) const {
+
+  ProgramStateRef State = C.getState();
----------------
benedekaibas wrote:

Yes, I agree. I will split this PR into two separate ones and will open another one which only focuses on the `Region` and `BaseRegion` cases.

https://github.com/llvm/llvm-project/pull/211045


More information about the cfe-commits mailing list