mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We had some unbalanced calls of `walkTo*Pre` and `walkTo*Post` in `SemaAnnotator`. The main fix was to set `Cancelled` to `true` if traversal is being stopped in `walkToExprPre`. While I was at it, I also - Added some more checks, ensuring that no more `walkTo*` calls are issued after `Cancelled` has been set to `true`. - Added some comments, describing the intended traversal behaviour. - Inverted the return value of the `ReportParamList` lambda to be in line with the return value of the enclosing `walkToDeclPre` - Moved `walkToExprPost` to be place right after `walkToExprPre` Resolves rdar://64139829 [SR-12957]
5.6 KiB
5.6 KiB