1
0
mirror of https://github.com/golang/go synced 2024-11-19 00:04:40 -07:00
go/ssa
Alan Donovan 8c66e887f7 go.tools/ssa: a blocking select's implicit "default" case should runtime-panic, not fall through.
Although such a control-flow path is impossible by
construction, we must avoid no-arg returns (even if
unreachable) in non-void functions.

Tested by adding a sanity-check that ssa.Return has the correct arity.
Also: added ssautil.Switches() test.

Fixes golang/go#7702

R=gri, axwalk
CC=golang-codereviews
https://golang.org/cl/46520043
2014-01-02 15:12:23 -05:00
..
interp go.tools/ssa: a blocking select's implicit "default" case should runtime-panic, not fall through. 2014-01-02 15:12:23 -05:00
ssautil go.tools/ssa: a blocking select's implicit "default" case should runtime-panic, not fall through. 2014-01-02 15:12:23 -05:00
testdata go.tools/ssa: fix crash on (new)(T) due to missing unparen() call. 2013-10-29 11:07:09 -04:00
blockopt.go go.tools/ssa: populate Function.Referrers(), for anon functions. 2013-11-07 10:08:51 -05:00
builder_test.go go.tools/ssa: fix computation of set of types requiring method sets. 2013-10-23 17:07:52 -04:00
builder.go go.tools/ssa: a blocking select's implicit "default" case should runtime-panic, not fall through. 2014-01-02 15:12:23 -05:00
const.go go.tools/ssa: eliminate remaining uses of operands of "untyped" type. 2013-12-04 13:59:55 -05:00
create.go go.tools/ssa: display named types package-qualified using types.TypeString. 2013-11-15 09:21:48 -05:00
doc.go go.tools/ssa: move AllFunctions to ssautil subpackage 2013-12-05 17:16:00 -05:00
dom.go go.tools/importer: move PathEnclosingInterval to package astutil. 2013-12-09 09:36:29 -05:00
emit.go go.tools/ssa: fix builder crash in select { case n, _ := <-c: ... }. 2013-11-21 15:38:58 -05:00
example_test.go ssa: Update the location of the ssadump command in an example comment. 2013-12-16 10:05:40 -05:00
func.go go.tools/ssa: expose dominator tree of control-flow graph in API. 2013-12-05 09:50:18 -05:00
lift.go go.tools/ssa: expose dominator tree of control-flow graph in API. 2013-12-05 09:50:18 -05:00
lvalue.go go.tools/ssa: record lvalue/rvalue distinction precisely in DebugRef. 2013-10-24 18:31:50 -04:00
print.go go.tools/go/types: use types.ChanDir instead of ast.ChanDir 2013-12-17 15:45:01 -08:00
promote.go go.tools/ssa: fix computation of set of types requiring method sets. 2013-10-23 17:07:52 -04:00
sanity.go go.tools/ssa: a blocking select's implicit "default" case should runtime-panic, not fall through. 2014-01-02 15:12:23 -05:00
source_test.go go.tools/importer: move PathEnclosingInterval to package astutil. 2013-12-09 09:36:29 -05:00
source.go go.tools/ssa: new Function.Syntax() returns the declaring AST (debug mode) or just the Pos/End of the function's extent (otherwise). 2013-10-27 10:55:21 -04:00
ssa.go go.tools/go/types: use types.ChanDir instead of ast.ChanDir 2013-12-17 15:45:01 -08:00
stdlib_test.go go.tools/ssa: move AllFunctions to ssautil subpackage 2013-12-05 17:16:00 -05:00
testmain.go go.tools/ssa: don't synthesize an empty "testmain" package. 2013-11-13 16:05:13 -05:00
util.go go.tools/ssa: implement correct control flow for recovered panic. 2013-10-14 15:38:56 -04:00