Commit dab199c9 authored by Cuong Manh Le's avatar Cuong Manh Le Committed by Keith Randall

cmd/compile: consistenly use CTxxx for works relate to Ctype

Passes toolstash-check

Change-Id: Iaeaf2575b9f492e45619007438c0138f9d22006c
Reviewed-on: https://go-review.googlesource.com/c/go/+/200959
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarKeith Randall <khr@golang.org>
parent 4c9e757d
...@@ -552,7 +552,7 @@ func tostr(v Val) Val { ...@@ -552,7 +552,7 @@ func tostr(v Val) Val {
func consttype(n *Node) Ctype { func consttype(n *Node) Ctype {
if n == nil || n.Op != OLITERAL { if n == nil || n.Op != OLITERAL {
return 0 return CTxxx
} }
return n.Val().Ctype() return n.Val().Ctype()
} }
......
...@@ -202,7 +202,7 @@ func isaddrokay(n *Node) bool { ...@@ -202,7 +202,7 @@ func isaddrokay(n *Node) bool {
// The result of addrTemp MUST be assigned back to n, e.g. // The result of addrTemp MUST be assigned back to n, e.g.
// n.Left = o.addrTemp(n.Left) // n.Left = o.addrTemp(n.Left)
func (o *Order) addrTemp(n *Node) *Node { func (o *Order) addrTemp(n *Node) *Node {
if consttype(n) > 0 { if consttype(n) != CTxxx {
// TODO: expand this to all static composite literal nodes? // TODO: expand this to all static composite literal nodes?
n = defaultlit(n, nil) n = defaultlit(n, nil)
dowidth(n.Type) dowidth(n.Type)
......
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