cmd/cgo: revert CL 49490 "fix for function taking pointer typedef"

CL 49490 fixed a warning when compiling the C code generated by cgo,
but it introduced typedef conflicts in Go code that cgo is supposed to
avoid.

Original CL description:

    cmd/cgo: fix for function taking pointer typedef

    Fixes #19832

Updates #19832
Fixes #23720

Change-Id: I22a732db31be0b4f7248c105277ab8ee44ef6cfb
Reviewed-on: https://go-review.googlesource.com/92455
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
Ian Lance Taylor 2018-02-06 15:11:59 -08:00
parent 23e8e197b0
commit c07095cd28
2 changed files with 0 additions and 22 deletions

View file

@ -2250,12 +2250,6 @@ func (c *typeConv) FuncArg(dtype dwarf.Type, pos token.Pos) *Type {
break
}
// If we already know the typedef for t just use that.
// See issue 19832.
if def := typedef[t.Go.(*ast.Ident).Name]; def != nil {
break
}
t = c.Type(ptr, pos)
if t == nil {
return nil