================ @@ -912,3 +924,33 @@ void top_malloc_no_crash_fn() { free(pptr); } } // namespace alloca_region_pointer + +namespace true_negatives_return_expressions { +struct Container { int *x; }; + +int test2() { + int x = 14; ---------------- Flandini wrote:
I also added a similar test case in 029d1228f65420b6b961929fe8222f427d7af7a7 that is giving a false negative on the return expression checking: ``` void ***param_ptr_to_ptr_to_ptr_return(void ***ppp) { int local = 0; **ppp = &local; return ppp; // expected-warning@-1 {{Address of stack memory associated with local variable 'local' is still referred to by the caller variable 'ppp' upon returning to the caller. This will be a dangling reference}} } ``` https://github.com/llvm/llvm-project/pull/125638 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits