Skip to content

Corrects wrong insertion point for 'await' at uncovered 'async' site. #66732

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

Closed
wants to merge 1 commit into from

Conversation

Rajveer100
Copy link
Contributor

Fixes Issue #65913

@Rajveer100
Copy link
Contributor Author

@YOCKOW @AnthonyLatsis

Copy link
Collaborator

@AnthonyLatsis AnthonyLatsis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test. As is, this change will most likely break some tests, so I’m going to trigger CI for you to inspect the failures.

@AnthonyLatsis
Copy link
Collaborator

@swift-ci please smoke test macOS

@Rajveer100
Copy link
Contributor Author

Rajveer100 commented Jun 17, 2023

Please add a test. As is, this change will most likely break some tests, so I’m going to trigger CI for you to inspect the failures.

Well, I suspect that too as we must probably handle the cases separately for each type of expression in an async await call expression (ex. tryExpr, closure, _, etc), let's see!

Regarding tests, I presume there would be cases as mentioned above, let me know if I missed out any!

@Rajveer100
Copy link
Contributor Author

Rajveer100 commented Jun 19, 2023

After some debugging I found that only these two lines by themselves are causing an issue:

auto anchorDecl = dyn_cast<DeclRefExpr>(anchor);
auto anchorVar = dyn_cast<VarDecl>(anchorDecl->getDecl()); (Trigger line)

Regarding the tests itself, before they are even checked, there seems to be internal error (probably memory error/bad access/similar), hence shows 'Please submit a bug report' as stderr.

Test file: ClangImporter/objc_async.swift

@Rajveer100
Copy link
Contributor Author

Rajveer100 commented Feb 20, 2024

@AnthonyLatsis
I am closing this one, since @Jamezzzb has a PR that's pretty close and does not break the tests. Looks like I had force unwrapped the null values which should have instead been checked.

@Rajveer100 Rajveer100 closed this Feb 20, 2024
@AnthonyLatsis
Copy link
Collaborator

AnthonyLatsis commented Feb 20, 2024

For the future: Don’t be shy to ping someone once every 2 weeks or so in PRs if you want a review. We sometimes do forget to get back to stuff.

@Rajveer100
Copy link
Contributor Author

Rajveer100 commented Feb 20, 2024

For the future: Don’t be shy to ping someone once every 2 weeks or so in PRs if you want a review. We sometimes do forget to get back to stuff.

Indeed!

PS: By the way I am excited for GSoC 2024, hoping to land proposals just like last year and getting accepted this time, larger contributions are always fun!

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.

2 participants