[clang] [analyzer] Fix false positive for stack-addr leak on simple param ptr (PR #107003)

Arseniy Zaostrovnykh via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 2 19:21:29 PDT 2024


================
@@ -791,3 +791,30 @@ void global_ptr_to_ptr() {
   *global_pp = nullptr;
 }
 } // namespace leaking_via_indirect_global_invalidated
+
+namespace not_leaking_via_simple_ptr {
+void top(const char *p) {
----------------
necto wrote:

I am not sure what you are referring to by the "ref case". There is already `param_ref_to_struct_with_ptr_top` and `param_ref_to_ptr_top`.
I added other cases in 8a9a76a3d1b1

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


More information about the cfe-commits mailing list