Clear stack frame on function return

Hi everyone,

for some testing of some secure coding ideas I want to clear the stack
frame (local variables and function arguments passed by value) on
function return. I want to implement this in a clang plugin.

Is there an easy way to access the stack frame? Any idea is welcome!

Kind regards