[tools] internal/analysisinternal: IsChildOf(Cursor, edge.Kind) bool

1 view
Skip to first unread message

Alan Donovan (Gerrit)

unread,
Oct 7, 2025, 5:23:31 PM (15 hours ago) Oct 7
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Robert Findley, Go LUCI, golang-co...@googlegroups.com

Alan Donovan submitted the change

Change information

Commit message:
internal/analysisinternal: IsChildOf(Cursor, edge.Kind) bool

This CL promotes a helper function and uses it in place
of Cursor.ParentEdge in all appropriate places.
It is very convenient when checking a node's
parentage in an expression context.
Change-Id: I3151cdb3687957905c7d59e57e823926fce847a0
Reviewed-by: Robert Findley <rfin...@google.com>
Files:
  • M go/analysis/passes/inline/gofix.go
  • M go/analysis/passes/modernize/errorsastype.go
  • M go/analysis/passes/modernize/minmax.go
  • M go/analysis/passes/modernize/modernize.go
  • M go/analysis/passes/modernize/reflect.go
  • M go/analysis/passes/modernize/stditerators.go
  • M gopls/internal/analysis/maprange/maprange.go
  • M gopls/internal/golang/codeaction.go
  • M gopls/internal/golang/inline.go
  • M gopls/internal/golang/undeclared.go
  • M internal/analysisinternal/analysis.go
Change size: M
Delta: 11 files changed, 71 insertions(+), 80 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Robert Findley
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: I3151cdb3687957905c7d59e57e823926fce847a0
Gerrit-Change-Number: 708957
Gerrit-PatchSet: 6
Gerrit-Owner: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Robert Findley <rfin...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages