[pulse] rewrite test to avoid stack variable address escape

Summary: Pulse is about to be smart enough to detect that bug.

Reviewed By: da319

Differential Revision: D13466895

fbshipit-source-id: 79afd2d51
master
Jules Villard 6 years ago committed by Facebook Github Bot
parent 1b79f13a18
commit c77f22310a

@ -247,7 +247,8 @@ std::unique_ptr<A>* allocate_in_branch_ok(bool b) {
a3 = &a2;
}
return a3;
// read a3
const B* read = (*a3)->f;
}
} // namespace use_after_destructor

Loading…
Cancel
Save