aaron.ballman added a comment. In D82940#2125183 <https://reviews.llvm.org/D82940#2125183>, @riccibruno wrote:
> > I'm not certain I understand, but I'm removing my LG while we figure it > > out. Can you expound a bit further? > > Take a look at the AST dump of a small modification of the reduced test case > which doesn't trigger the assertion: > > void should_not_crash_with_switch_in_lambda() { > switch (1) > default:; > auto f = [] { > switch (1) > default:; > }; > } > > > Before the serialization of `LambdaExpr` for the `LambdaExpr *E`, we have > `E->getBody() == E->getCallOperator()->getBody()`. > After serialization this is not true anymore because we are writing and > reading the body directly when visiting the `LambdaExpr` > (the captures have the same problem). Ah, thank you for the explanation! That does seem like an issue, good catch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82940/new/ https://reviews.llvm.org/D82940 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits