3 // This file tests facts produced by ctrlflow.
17 func a() { // want a:"noReturn"
26 func b() { // want b:"noReturn"
30 func f(x int) { // no fact here
37 // default case returns
42 func (T) method1() { // want method1:"noReturn"
46 func (T) method2() { // (may return)
52 // Checking for the noreturn fact associated with F ensures that
53 // ctrlflow proved each of the listed functions was "noReturn".
55 func standardFunctions(x int) { // want standardFunctions:"noReturn"
93 // False positives are possible.
94 // This function is marked noReturn but in fact returns.
96 func spurious() { // want spurious:"noReturn"
97 defer func() { recover() }()
107 func h() { // want h:"noReturn"