mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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 <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
329fff0db0
commit
ba1a65fc51
1 changed files with 1 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue