tools/go/analysis/passes/buildssa
Alan Donovan 6adeb8aab2 go/analysis/passes/nilness: degenerate nil condition checker
This check uses the control-flow graph and SSA value graph to detect
problems such as:

	p := &v
	...
	if p != nil { // tautological condition
	}

and:

	if p == nil {
		print(*p) // nil dereference
	}

(It was originally developed within Google's Go analysis framework and
can now be published in a form useful to all analysis drivers.)

This CL also includes buildssa, an Analyzer that constructs SSA for
later analysis passes but does not report diagnostics or facts of its
own.

Change-Id: I27bc4eea10d71d958685a403234879112c21f433
Reviewed-on: https://go-review.googlesource.com/c/142698
Reviewed-by: Michael Matloob <matloob@golang.org>
2018-10-19 00:59:45 +00:00
..
testdata/src/a go/analysis/passes/nilness: degenerate nil condition checker 2018-10-19 00:59:45 +00:00
buildssa.go go/analysis/passes/nilness: degenerate nil condition checker 2018-10-19 00:59:45 +00:00
buildssa_test.go go/analysis/passes/nilness: degenerate nil condition checker 2018-10-19 00:59:45 +00:00