Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clang][ASTImporter] Fix a bug when importing CXXDefaultInitExpr. #50

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

finomen
Copy link

@finomen finomen commented Oct 31, 2022

The "in-class initializer" expression should be set in the field of a default initialization expression before this expression node is created. The CXXDefaultInitExpr objects are created after the AST is loaded and at import not present in the "To" AST. And the in-class initializers of the used fields can be missing too, these must be set at import.

This fixes a github issue llvm#54061.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D120824

The "in-class initializer" expression should be set in the field of a
default initialization expression before this expression node is created.
The `CXXDefaultInitExpr` objects are created after the AST is loaded and
at import not present in the "To" AST. And the in-class initializers of
the used fields can be missing too, these must be set at import.

This fixes a github issue llvm#54061.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D120824
@finomen finomen merged commit fd63927 into ddln-llvm-14 Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants