This check is based on https://reviews.llvm.org/D36022 but it takes a bit different approach. It does less state splitting and tries to avoid the evalCall callback. The state machine is also a bit different, now the escaped and untracked states are merged.
There were some problems in the original patch with non-pointer escapes. I did not really see those problems with my current model (which is slightly different) but there might be some skeletons waiting to fall out.