[clang] [clang][docs] Add documentation for the DanglingPtrDeref checker (PR #216688)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 17 10:45:25 PDT 2026
================
@@ -3351,6 +3351,62 @@ remove the const qualifier from the original declaration or use a mutable copy.
alpha.cplusplus
^^^^^^^^^^^^^^^
+.. _alpha-cplusplus-DanglingPtrDeref:
+
+alpha.cplusplus.DanglingPtrDeref (C++)
+""""""""""""""""""""""""""""""""""""""
+Check for dereferences of pointers that refer to an object whose
+lifetime has already ended. Such a pointer is dangling. The checker
+reports it when it is dereferenced and when it is passed to a function.
----------------
Xazax-hun wrote:
Don't we also report when it is returned from a function?
https://github.com/llvm/llvm-project/pull/216688
More information about the cfe-commits
mailing list