mirror of
https://github.com/golang/go
synced 2024-11-17 19:54:45 -07:00
cmd/compile/internal/types: don't return *Sym from Pushdcl (it's never used)
Change-Id: Ib55f7ea3f7dcd9d02f6027121663870a65cb886c Reviewed-on: https://go-review.googlesource.com/39924 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
fd44d872de
commit
dc243f257b
@ -909,7 +909,7 @@ func (p *noder) commClauses(clauses []*syntax.CommClause) []*Node {
|
||||
|
||||
func (p *noder) labeledStmt(label *syntax.LabeledStmt) *Node {
|
||||
lhs := p.nod(label, OLABEL, p.newname(label.Label), nil)
|
||||
lhs.Sym = types.Dclstack
|
||||
lhs.Sym = types.Dclstack // context, for goto restriction
|
||||
|
||||
var ls *Node
|
||||
if label.Stmt != nil { // TODO(mdempsky): Should always be present.
|
||||
|
@ -46,10 +46,9 @@ func push(pos src.XPos) *Sym {
|
||||
|
||||
// Pushdcl pushes the current declaration for symbol s (if any) so that
|
||||
// it can be shadowed by a new declaration within a nested block scope.
|
||||
func Pushdcl(s *Sym, pos src.XPos) *Sym {
|
||||
func Pushdcl(s *Sym, pos src.XPos) {
|
||||
d := push(pos)
|
||||
dcopy(d, s)
|
||||
return d
|
||||
}
|
||||
|
||||
// Popdcl pops the innermost block scope and restores all symbol declarations
|
||||
|
Loading…
Reference in New Issue
Block a user