aboutsummaryrefslogtreecommitdiff
path: root/test/live.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2016-09-22 13:50:16 -0400
committerCherry Zhang <cherryyz@google.com>2016-09-22 20:10:30 +0000
commitd586aae1f44ebdf0e8f92137856b4b62c41cac6a (patch)
tree5a6ce361fa4c4f36cfb53543cc609297e30cc213 /test/live.go
parent3dfb92f254ed4f94e3c98a789c171a1cd9c2563d (diff)
downloadgo-d586aae1f44ebdf0e8f92137856b4b62c41cac6a.tar.gz
go-d586aae1f44ebdf0e8f92137856b4b62c41cac6a.zip
test: errorcheck auto-generated functions
Add an "errorcheckwithauto" action which performs error check including lines with auto-generated functions (excluded by default). Comment "// ERRORAUTO" matches these lines. Add testcase for CL 29570 (as an example). Updates #16016, #17186. Change-Id: Iaba3727336cd602f3dda6b9e5f97dafe0848e632 Reviewed-on: https://go-review.googlesource.com/29652 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'test/live.go')
-rw-r--r--test/live.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/live.go b/test/live.go
index 25ea07d5de..b4d569a1ba 100644
--- a/test/live.go
+++ b/test/live.go
@@ -1,4 +1,4 @@
-// errorcheck -0 -l -live -wb=0
+// errorcheckwithauto -0 -l -live -wb=0
// +build !ppc64,!ppc64le
// ppc64 needs a better tighten pass to make f18 pass
@@ -658,3 +658,10 @@ func ddd1(x, y *int) { // ERROR "live at entry to ddd1: x y$"
func ddd2(a ...*int) { // ERROR "live at entry to ddd2: a$"
sink = a[0]
}
+
+// issue 16016: autogenerated wrapper should have arguments live
+type T struct{}
+
+func (*T) Foo(ptr *int) {}
+
+type R struct{ *T } // ERRORAUTO "live at entry to \(\*R\)\.Foo: \.this ptr" "live at entry to R\.Foo: \.this ptr"