Skip to content

Commit ba1a65f

Browse files
hirochachachaianlancetaylor
authored andcommitted
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 329fff0 commit ba1a65f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/cmd/cgo/gcc.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,10 @@ func (p *Package) guessKinds(f *File) []*Name {
269269
}
270270
}
271271

272-
needType = append(needType, n)
273-
274272
// If this is a struct, union, or enum type name, no need to guess the kind.
275273
if strings.HasPrefix(n.C, "struct ") || strings.HasPrefix(n.C, "union ") || strings.HasPrefix(n.C, "enum ") {
276274
n.Kind = "type"
275+
needType = append(needType, n)
277276
continue
278277
}
279278

0 commit comments

Comments
 (0)