This repository has been archived by the owner on Nov 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Getting typedef name of a return value of a typedef function #57
Comments
@xlab Max please take a look at the test I've just pushed. It passes, so I probably did not understood the problem. Please clarify or adjust the test to fail, thank you. |
@cznic typedef int bool_t;
typedef bool_t (*bool_func) (void);
typedef bool_func func1; |
cznic
pushed a commit
that referenced
this issue
Sep 25, 2016
@xlab PTAL, thanks. |
This needs a typo fix, otherwise works fine! Brilliant! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hey, I'm struggling with this case and CC, there seems to be no way to distinguish the typedef name of a return value type and the function typedef name.
I can get either
trying to resolve the returning values of these three functions or
whereas the real situation is
See https://github.com/xlab/cgogen/blob/ce6cef3a5c56da7c4d87379c35594a413418b024/translator/ast_walker.go#L348-L351 how this should be actually handled? Accessing the
typ.Result()
doesn't provide the typedef name of its type (I getint
), trying to get it viatyp.Result().Declarator().RawSpecifier()
would yield specifier of a function typedef, not the resulting type. I'm not sure if the CC API is incomplete or it's a bug or I don't know something.The text was updated successfully, but these errors were encountered: