tools/go/analysis
Alan Donovan f62bfb5415 go/analysis/passes/printf: fix regression in "recursive stringer" logic
The recursive stringer check should report cases such as

   func (x T) String() string { return fmt.Sprint(x) }

in which the receiver x (or possibly &x) was passed into a fmt print call.
However, in translating it from the go/ast to the go/types representation,
I inadvertently made it report any situation in which a value of type T
was passed to fmt, even when the value is not x, as in:

   func (cons *cons) String() string {
	... fmt.Sprint(cons.cdr) ...
   }

Fixed and tested.

Change-Id: I57e88755c9989deaaad45cc306a604f3db4ee269
Reviewed-on: https://go-review.googlesource.com/c/149616
Reviewed-by: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
2018-11-15 16:22:56 +00:00
..
analysistest go/analysis/cmd/analyze: install all analyzers 2018-10-19 17:03:54 +00:00
cmd go/analysis/unitchecker: a main function for vet-lite tools 2018-11-15 16:00:22 +00:00
internal go/analysis/unitchecker: a main function for vet-lite tools 2018-11-15 16:00:22 +00:00
multichecker go/analysis/unitchecker: a main function for vet-lite tools 2018-11-15 16:00:22 +00:00
passes go/analysis/passes/printf: fix regression in "recursive stringer" logic 2018-11-15 16:22:56 +00:00
singlechecker go/analysis/unitchecker: a main function for vet-lite tools 2018-11-15 16:00:22 +00:00
unitchecker go/analysis/unitchecker: a main function for vet-lite tools 2018-11-15 16:00:22 +00:00
analysis.go go/analysis: write package documentation 2018-10-08 17:31:26 +00:00
doc.go go/analysis: doc updates 2018-11-15 15:56:33 +00:00
validate.go go/analysis: validate: report duplicates among analyzers (roots) 2018-10-11 19:55:00 +00:00