| 1 |
// Copyright 2025 The Go Authors. All rights reserved. |
| 2 |
// Use of this source code is governed by a BSD-style |
| 3 |
// license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
// Package cfginternal exposes internals of go/cfg. |
| 6 |
// It cannot actually depend on symbols from go/cfg. |
| 7 |
package cfginternal |
| 8 |
|
| 9 |
// IsNoReturn exposes (*cfg.CFG).noReturn to the ctrlflow analyzer. |
| 10 |
// TODO(adonovan): add CFG.NoReturn to the public API. |
| 11 |
// |
| 12 |
// You must link [golang.org/x/tools/go/cfg] into your application for |
| 13 |
// this function to be non-nil. |
| 14 |
var IsNoReturn = func(cfg any) bool { |
| 15 |
panic("golang.org/x/tools/go/cfg not linked into application") |
| 16 |
} |