1
0
mirror of https://github.com/golang/go synced 2024-11-05 19:56:11 -07:00
go/misc/cgo/testgodefs/testdata
Matthew Dempsky b565d1ec16 cmd/cgo: use type aliases for #define type macros
Cgo's initial design for handling "#define foo int*" involved
rewriting "C.foo" to "*_Ctype_int" everywhere. But now that we have
type aliases, we can declare "type _Ctype_foo = *_Ctype_int" once, and
then rewrite "C.foo" to just "_Ctype_foo".

This is important for go/types's UsesCgo mode, where go/types needs to
be able to figure out a type for each C.foo identifier using only the
information written into _cgo_gotypes.go.

Fixes #38649.

Change-Id: Ia0f8c2d82df81efb1be5bc26195ea9154c0af871
Reviewed-on: https://go-review.googlesource.com/c/go/+/230037
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-05-01 18:01:28 +00:00
..
anonunion.go
fieldtypedef.go
issue8478.go
issue37479.go
issue37621.go
issue38649.go cmd/cgo: use type aliases for #define type macros 2020-05-01 18:01:28 +00:00
main.go cmd/cgo: use type aliases for #define type macros 2020-05-01 18:01:28 +00:00