[PATCH] D82940: [ASTReader][ASTWriter][PCH][Modules] Fix (de)serialization of SwitchCases
Bruno Ricci via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 1 05:22:51 PDT 2020
riccibruno added a comment.
> 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).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82940/new/
https://reviews.llvm.org/D82940
More information about the cfe-commits
mailing list