cmd/compile: rewrite %1v and %2v formats to %S and %L (short and long)

- also consistently use %v instead of %s when we have a (gc) Formatter
- rewrite done automatically using Formats test in -u (update) mode
- manual update of format strings that were not single string constants
- updated fmt.go, fmt_test.go accordingly
- fmt_test: permit "%T" always

Change-Id: I8f0704286aba5704600ad0c4a4484005b79b905d
Reviewed-on: https://go-review.googlesource.com/28954
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Robert Griesemer 2016-09-09 21:08:46 -07:00
parent af8ca3387a
commit 6537e18f02
40 changed files with 206 additions and 209 deletions

View file

@ -556,7 +556,7 @@ func overflow(v Val, t *Type) {
}
if doesoverflow(v, t) {
Yyerror("constant %s overflows %v", v, t)
Yyerror("constant %v overflows %v", v, t)
}
}
@ -1595,7 +1595,7 @@ func (n *Node) Convconst(con *Node, t *Type) {
var i int64
switch n.Val().Ctype() {
default:
Fatalf("convconst ctype=%d %2v", n.Val().Ctype(), t)
Fatalf("convconst ctype=%d %L", n.Val().Ctype(), t)
case CTINT, CTRUNE:
i = n.Int64()
@ -1632,7 +1632,7 @@ func (n *Node) Convconst(con *Node, t *Type) {
return
}
Fatalf("convconst %2v constant", t)
Fatalf("convconst %L constant", t)
}
// complex multiply v *= rv