Commit dc243f25 authored by Robert Griesemer's avatar Robert Griesemer

cmd/compile/internal/types: don't return *Sym from Pushdcl (it's never used)

Change-Id: Ib55f7ea3f7dcd9d02f6027121663870a65cb886c
Reviewed-on: https://go-review.googlesource.com/39924Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
parent fd44d872
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment