================
@@ -112,3 +112,56 @@ void inlined_callee_single_report() {
// expected-note@-1 {{Calling 'deref_param'}}
(void)r;
}
+
+struct MyBuffer {
+ char buffer[8];
+};
+
+void member_subregion_dangling_deref() {
+ const char *p = nullptr;
+ {
+ struct MyBuffer tmp_buffer = {};
+ p = tmp_buffer.buffer;
----------------
Xazax-hun wrote:
Could we maybe add some pointer arithmetic, so we don't only point to the first
element of the array?
https://github.com/llvm/llvm-project/pull/211552
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits