delete’ of ‘& buf’ which points to memory on the stack [-Wanalyzer-free-of-non-heap]
25 delete p; // { dg-warning "memory on the stack" }
^
void test_3()
void test_3(): events 1-5
23 char buf[sizeof(int)]; // { dg-message "region created on stack here" }
^~~
|
(1) region created on stack here
(2) capacity: 4 bytes
24 int *p = new (buf) int (42);
~
|
(3) following ‘false’ branch... ─>─┐
───────────────────────────────────────────────────────────────┘
25 delete p; // { dg-warning "memory on the stack" }
~~~~~~~~
|
─>(4) ...to here
(5) following ‘true’ branch... ─>─┐
void test_3(): events 6-7
────────────────────────────────────┘
25 delete p; // { dg-warning "memory on the stack" }
^
|
────────>(6) ...to here
(7) ⚠️ call to ‘delete’ here
in on_xml_node, at analyzer/xml-state-to-dot.cc:436