Change information
Commit message:
go/analysis/passes/modernize: rangeint: result vars are implicit uses
This CL fixes a bug in rangeint that caused it to make unsound
fixes because it failed to consider that result variables can be
implicit uses of a loop index variable after the loop, and thus
the fix to golang/go#71952 was insufficient.
+ test
Fixes golang/go#76880
Change-Id: I9c4d2082d93204023f50afb07318037d9134de23
Files:
- M go/analysis/passes/modernize/rangeint.go
- M go/analysis/passes/modernize/testdata/src/rangeint/rangeint.go
- M go/analysis/passes/modernize/testdata/src/rangeint/rangeint.go.golden
Change size: S
Delta: 3 files changed, 44 insertions(+), 0 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +2 by Kirill Kolyshkin, +2 by Madeline Kalil
TryBots-Pass: LUCI-TryBot-Result-1 by Go LUCI, TryBot-Bypass+1 by Alan Donovan