go/misc/cgo
Tobias Klauser cdd55a324b [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: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit a265c2c448)
Reviewed-on: https://go-review.googlesource.com/c/go/+/226497
2020-03-30 21:07:05 +00:00
..
errors cmd/cgo: do not rewrite call if there are more args than parameters 2019-07-12 17:31:29 +00:00
fortran misc/cgo/fortran: avoid writing to $PWD 2019-11-20 22:37:23 +00:00
gmp
life misc: remove use of relative directories in overlayDir functions 2019-11-25 16:26:15 +00:00
nocgo
stdio misc: remove use of relative directories in overlayDir functions 2019-11-25 16:26:15 +00:00
test cmd/go: fix cgo test when min macOS version is set 2020-01-24 17:36:44 +00:00
testasan misc: log 'ok' from 'go run' tests on success 2019-11-25 16:43:27 +00:00
testcarchive misc: remove use of relative directories in overlayDir functions 2019-11-25 16:26:15 +00:00
testcshared misc: remove use of relative directories in overlayDir functions 2019-11-25 16:26:15 +00:00
testgodefs [release-branch.go1.14] cmd/cgo, misc/cgo: only cache anonymous struct typedefs with parent name 2020-03-30 21:07:05 +00:00
testplugin misc: remove use of relative directories in overlayDir functions 2019-11-25 16:26:15 +00:00
testsanitizers runtime: save/restore callee saved registers in arm64's sigtramp 2019-06-03 19:02:11 +00:00
testshared misc/cgo/testshared: do not write to GOROOT 2019-11-25 17:05:01 +00:00
testsigfwd misc: log 'ok' from 'go run' tests on success 2019-11-25 16:43:27 +00:00
testso misc: remove use of relative directories in overlayDir functions 2019-11-25 16:26:15 +00:00
testsovar misc: remove use of relative directories in overlayDir functions 2019-11-25 16:26:15 +00:00
testtls