Now to get this to take place in the callers of the function still the type has stale stack offsets (its separate from the frame):
Code:
ida_typeinf.guess_tinfo(tinfo, ea)
fi.cc = (fi.cc & ~idaapi.CM_M_MASK) | idaapi.CM_M_FN
tinfo.create_func(fi)
ida_typeinf.apply_tinfo(ea, tinfo, idaapi.TINFO_DEFINITE)
Manually one could enumerate code x-refs to the function and use ida_typeinf.apply_callee_tinfo(callee_ea, tinfo).
Also an alternative to the processor module may be to use ida_typeinf.delete_wrong_frame_info(f, reanalyze_callback) but it requires a callback which takes instructions as an argument. Its not really intended for a complete refresh.