// 0: disabled
// 1: 80-nodes leaf functions, oneliners, lazy typechecking (default)
// 2: (unassigned)
-// 3: allow variadic functions
+// 3: (unassigned)
// 4: allow non-leaf functions
//
// At some point this may get another default and become switch-offable with -N.
//
// The debug['m'] flag enables diagnostic output. a single -m is useful for verifying
// which calls get inlined or not, more is for debugging, and may go away at any point.
-//
-// TODO:
-// - inline functions with ... args
package gc
Fatalf("caninl on non-typechecked function %v", fn)
}
- // can't handle ... args yet
- if Debug['l'] < 3 {
- f := fn.Type.Params().Fields()
- if len := f.Len(); len > 0 {
- if t := f.Index(len - 1); t.Isddd() {
- reason = "has ... args"
- return
- }
- }
- }
-
// Runtime package must not be instrumented.
// Instrument skips runtime package. However, some runtime code can be
// inlined into other packages and instrumented there. To avoid this,
-// errorcheck -0 -m -l=3
+// errorcheck -0 -m
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Test more aggressive inlining (-l=3 allows variadic functions)
+// Test inlining of variadic functions.
// See issue #18116.
package foo