You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`SyntaxRewriter` has had a problem with stack allocation space for a while because cases in a switch statement don’t share stack space in debug builds (rdar://55929175). We started seeing this issue with `SyntaxVisitor` as well now. Use the same approach to fix the problem:
To circumvent this problem, make calling the specific visitation function a two-step process: First determine the function to call in this function and return a reference to it, then call it. This way, the stack frame that determines the correct visitation function will be popped of the stack before the function is being called, making the switch's stack space transient instead of having it linger in the call stack.
And to make the entire approach look sane, allow 4 arguments on the same line for SyntaxVisitor instead of the 3 that we allow in all other files.
0 commit comments