[PATCH] D120824: [clang][ASTImporter] Fix a bug when importing CXXDefaultInitExpr.
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 9 02:52:36 PST 2022
martong added a comment.
Okay, thanks for the explanation.
> The in-class initializer expression is not always stored in the AST, in the ToTU it is missing initially. The field has the flag set that it contains in-class initializer but the actual expression is not set yet (probably because the code parser works this way).
So, the parser can really create such a node when the expression is not set? That seems like a bug in the parser. Anyway, would be nice to see a test case for it and perhaps fix in the parser.
But I have doubts that it would be a parser issue. I wonder whether it is rather this case: first we do an import that fails to set the expression and then the subsequent import crashes?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120824/new/
https://reviews.llvm.org/D120824
More information about the cfe-commits
mailing list