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

@ -340,7 +340,7 @@ func importvar(s *Sym, t *Type) {
declare(n, PEXTERN)
if Debug['E'] != 0 {
fmt.Printf("import var %v %2v\n", s, t)
fmt.Printf("import var %v %L\n", s, t)
}
}
@ -362,11 +362,11 @@ func importtype(pt *Type, t *Type) {
declare(n, PEXTERN)
checkwidth(pt)
} else if !Eqtype(pt.Orig, t) {
Yyerror("inconsistent definition for type %v during import\n\t%2v (in %q)\n\t%2v (in %q)", pt.Sym, pt, pt.Sym.Importdef.Path, t, importpkg.Path)
Yyerror("inconsistent definition for type %v during import\n\t%L (in %q)\n\t%L (in %q)", pt.Sym, pt, pt.Sym.Importdef.Path, t, importpkg.Path)
}
if Debug['E'] != 0 {
fmt.Printf("import type %v %2v\n", pt, t)
fmt.Printf("import type %v %L\n", pt, t)
}
}