This addresses an issue introduced in r183451: since removePiecesWithInvalidLocations is called *after* adjustCallLocations, it is not necessary, and in fact harmful, to have this assertion in adjustCallLocations.
Addresses rdar://36170689
Differential D41680
[analyzer] do not crash with assertion on processing locations of bodyfarmed functions george.karpenkov on Jan 2 2018, 1:38 PM. Authored by
Details This addresses an issue introduced in r183451: since removePiecesWithInvalidLocations is called *after* adjustCallLocations, it is not necessary, and in fact harmful, to have this assertion in adjustCallLocations. Addresses rdar://36170689
Diff Detail
Event TimelineComment Actions The error is triggered when analyzer finds a bug *inside* the callable captured by the body farm. and the bug needs both to trigger. Comment Actions Yep, so it still doesn't answer if removePiecesWithInvalidLocations() was dead code to begin with (considering that the assertion in adjustCallLocations() says that everything but call locations is valid by now, and call locations are fixed immediately after that). The piece with invalid location seems to be a control flow piece (grey piece / arrow) which is indeed not to be displayed to the user in this case. I'm still not sure how/if-at-all this worked before. But the new behavior looks correct and i don't see these questions as the most pressing issues we're having at the moment :) |