Commit cdd55a32 authored by Tobias Klauser's avatar Tobias Klauser Committed by Ian Lance Taylor
Browse files

[release-branch.go1.14] cmd/cgo, misc/cgo: only cache anonymous struct typedefs with parent name

CL 181857 broke the translation of certain C types using cmd/cgo -godefs
because it stores each typedef, array and qualified type with their
parent type name in the translation cache.

Fix this by only considering the parent type for typedefs of anonymous
structs which is the only case where types might become ambiguous.

Fixes #37622

Change-Id: I301a749ec89585789cb0d213593bb8b7341beb88
Reviewed-on: https://go-review.googlesource.com/c/go/+/226341


Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
(cherry picked from commit a265c2c4)
Reviewed-on: https://go-review.googlesource.com/c/go/+/226497
parent e6f15fab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment