From: Hiroshi Ioka Date: Thu, 2 Feb 2017 12:53:52 +0000 (+0900) Subject: cmd/cgo: don't track same node twice in guessKinds X-Git-Tag: go1.9beta1~1789 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ba1a65fc518c367bd4a3e18324036d457e6a07c3;p=gostls13.git cmd/cgo: don't track same node twice in guessKinds Change-Id: Ib2c1490a42e3485913a05a0b2fecdcc425d42871 Reviewed-on: https://go-review.googlesource.com/36083 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go index 5ea2d941ca..a740748d2f 100644 --- a/src/cmd/cgo/gcc.go +++ b/src/cmd/cgo/gcc.go @@ -269,11 +269,10 @@ func (p *Package) guessKinds(f *File) []*Name { } } - needType = append(needType, n) - // If this is a struct, union, or enum type name, no need to guess the kind. if strings.HasPrefix(n.C, "struct ") || strings.HasPrefix(n.C, "union ") || strings.HasPrefix(n.C, "enum ") { n.Kind = "type" + needType = append(needType, n) continue }