tools/go
Alan Donovan 3a5b620dc5 go/analysis/passes/ctrlflow: an Analyzer that builds CFGs
The ctrlflow Analyzer builds a control-flow graph (see
golang.org/x/tools/go/cfg) for each named and unnamed function in the
package.

It computes for each function whether it can never return, either
because the function is an intrinsic that stops the thread (e.g.
os.Exit), or because control never reaches a return statement, or
because the function inevitably calls another function that never
returns.  For each such function it exports a noReturn fact.

This change also:
- adds 'inspect', another Analyzer that builds an optimized AST
  traversal table for use by nearly every other Analyzer.
- changes analysistest.Run to return the analysis result to enable
  further testing.
  (This required changing it to analyze one package at a time,
  which is no less efficient, and is the typical case.)

Change-Id: I877e2b2363a365a9976aa9c2719ad3fba4df2634
Reviewed-on: https://go-review.googlesource.com/c/139478
Reviewed-by: Michael Matloob <matloob@golang.org>
2018-10-05 21:26:26 +00:00
..
analysis go/analysis/passes/ctrlflow: an Analyzer that builds CFGs 2018-10-05 21:26:26 +00:00
ast go/ast/inspector: faster (amortized) AST traversals 2018-09-28 18:13:43 +00:00
buildutil go/...: make most tests pass with gccgo 2018-06-08 16:58:49 +00:00
callgraph go/callgraph/cha: fix bug computing correspondence of abstract/concrete methods 2018-02-21 01:23:17 +00:00
cfg go/cfg: a syntactic control-flow graph (CFG) 2018-09-26 00:57:46 +00:00
gccgoexportdata go/gccgoexportdata: correctly handle archive files containing string tables 2016-11-09 21:28:38 +00:00
gcexportdata go/gcexportdata: add -package flag to diagnostic tool 2018-06-27 17:17:06 +00:00
internal go/internal/gccgoimporter: remove special case for Go1.9 2018-09-27 15:01:54 +00:00
loader go/internal/cgo: simplify names of ProcessCgoFiles and RunCgo 2018-08-08 19:23:19 +00:00
packages go/packages: skip TestLoadImportsC when Go has been built without cgo 2018-10-05 20:28:39 +00:00
pointer go/pointer: support reflect.Value in AddExtendedQuery 2018-08-13 20:51:10 +00:00
ssa go/ssa/interp: skip failing test 2018-09-25 15:50:07 +00:00
types go/types/objectpath: fix tests for pre-go1.11 2018-10-01 16:20:35 +00:00
vcs go/vcs: match go-import package prefixes by slash 2018-06-20 03:09:55 +00:00