When reaching the end of a function body, we need to ensure that the ExitFunctionBodyRAII object is destroyed before we pop the declaration context for the function. Exiting the function body causes us to handle immediate invocations, which involves template transformations that need to know the correct type for this.
This addresses PR48235.
(Note, the diff in Phrabricator looks more awful than it is in reality -- the only change to the code was to add a new compound scope, but indenting the contents of that new scope seems to make for confusing-looking diffs.)
so the only real change here is that ExitFunctionBodyRAII ends here, instead of the end of the function?
I guess this SEEMS pretty innocuous, I don't know particularly what PopFunctionScopeInfo does well enough to know if this is going to cause problems, but I DO know at least the 14850+ doesn't need to have the function body in scope (and PopDeclContext seems like it doesn't do much?)...
I would think that anything after PopDeclContext would have a problem being in the function body anyway (that is, being in a 'function body' with a mismatched DeclContext seems wrong), so I'm reasonably convinced this is at least non-breaking.