cmd/compile: run escape analysis after method wrapper generation
Also modified test/run.go to ignore messages prefixed <autogenerated>
because those cannot be described with "// ERROR ...", and backed out
patch from issue #9537 because it is no longer necessary. The reasons
described in the 9537 discussion for why escape analysis cannot run
late no longer hold, happily.
Fixes #11053.
Change-Id: Icb14eccdf2e8cde3d0f8fb8a216b765400a96385
Reviewed-on: https://go-review.googlesource.com/11088
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: David Chase <drchase@google.com>
diff --git a/test/run.go b/test/run.go
index f28995c..3cd95ec0 100644
--- a/test/run.go
+++ b/test/run.go
@@ -729,6 +729,7 @@
func splitOutput(out string) []string {
// 6g error messages continue onto additional lines with leading tabs.
// Split the output at the beginning of each line that doesn't begin with a tab.
+ // <autogenerated> lines are impossible to match so those are filtered out.
var res []string
for _, line := range strings.Split(out, "\n") {
if strings.HasSuffix(line, "\r") { // remove '\r', output by compiler on windows
@@ -736,7 +737,7 @@
}
if strings.HasPrefix(line, "\t") {
res[len(res)-1] += "\n" + line
- } else if strings.HasPrefix(line, "go tool") {
+ } else if strings.HasPrefix(line, "go tool") || strings.HasPrefix(line, "<autogenerated>") {
continue
} else if strings.TrimSpace(line) != "" {
res = append(res, line)