Skip to content

Commit

Permalink
Revert "Workaround issue #100 in cc"
Browse files Browse the repository at this point in the history
See xlab/pocketsphinx-go#9

This reverts commit d9011c6.
  • Loading branch information
xlab committed Aug 28, 2017
1 parent ba91ca4 commit 9ae9e8c
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions translator/ast_walker.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,15 +398,6 @@ func memberName(n int, m cc.Member) string {
}

func typedefNameOf(typ cc.Type) string {
// There is a bug in cc's parser that causes it to misidentify the type of
// a function pointer as its return type.
// (See https://github.com/cznic/cc/issues/100)
// To work around this bug, we first check if the type is a function and if
// so, verify it's declared via a typedef before proceeding to get the
// typedef's name.
if typ.Kind() == cc.Function && typ.Declarator().DirectDeclarator.Case != 0 {
return ""
}
rawSpec := typ.Declarator().RawSpecifier()
if name := rawSpec.TypedefName(); name > 0 {
return blessName(xc.Dict.S(name))
Expand Down

0 comments on commit 9ae9e8c

Please sign in to comment.