-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/tools/gopls: Incorrect warnings that yield maybe called again #70598
Comments
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
Smaller repro:
The first call to yield is unconditional, and the second depends on the result of the first, so there's no problem there. But the third depends on the phi(false, t1) node representing the two alternatives of
The analyzer should work harder to recursively analyze phi nodes used as conditions, especially when the phi operands are constants. |
Change https://go.dev/cl/632117 mentions this issue: |
Change https://go.dev/cl/633196 mentions this issue: |
This comment is the residue of futile couple of hours last week playing with more sophisticated approaches to fixing golang/go#70598 Updates golang/go#70598 Change-Id: I92fc5433189ae4558aa615bdafb7e680e8636b2e Reviewed-on: https://go-review.googlesource.com/c/tools/+/633196 Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Alan Donovan <adonovan@google.com>
This comment is the residue of futile couple of hours last week playing with more sophisticated approaches to fixing golang/go#70598 Updates golang/go#70598 Change-Id: I92fc5433189ae4558aa615bdafb7e680e8636b2e Reviewed-on: https://go-review.googlesource.com/c/tools/+/633196 Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Alan Donovan <adonovan@google.com>
Change https://go.dev/cl/633709 mentions this issue: |
Change https://go.dev/cl/633702 mentions this issue: |
Go version
go version go1.23.3 linux/amd64 & gopls version golang.org/x/tools/gopls v0.17.0-pre.3
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
Get 3 warnings that yield maybe called again.
What did you expect to see?
No warnings.
The text was updated successfully, but these errors were encountered: