New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ref points to typedef instead of typedef'd enum #9359
Comments
A simple 'fix' would be to use: typedef enum foo foo;
/**
* Docs for foo.
*/
enum foo {
int member; //!< Member doc
};
/**
* Some function.
*
* @param f Parameter of type @ref foo
*/
void func(foo f); Any reason why the documentation needs to be in front of the typedef if you actually want to document the enum?
|
Did you test this? The 'fix' exhibits the same bug as the code I provided. I tested this already as I was trying to state by my comment:
Sadly yes. The actual code goes something like this: #define _UI_ENUM(s) typedef unsigned int s; enum
/**
* Docs for foo.
*
* @enum foo
*/
_UI_ENUM(foo) {
int member; //!< Member doc
};
/**
* Some function.
*
* @param f Parameter of type @ref foo
*/
void func(foo f); Defining the type as unsigned is done for future ABI compatability of the library. We then redefine Removing the |
@szanni For me personally, the "TYPEDEF_HIDES_STRUCT" feature was the answer. This avoided the problem entirely by eliminating the duplicate entry. I don't know if this will work for you but I figured I'd mention it. |
Describe the bug
When using the
\ref
command to link to anenum
it will create a link to thetypedef
instead of the theenum
itself.Expected behavior
The link created by the
\ref
command should point to the documentedenum
, like links in the type signature do.Screenshots
As highlighted in the screenshot: the
\ref foo
points to thetypedef
, whereas the type signature correctly points to theenum
.To Reproduce
Doxygen the following code or the attached example. Check the HTML documentation. The link created by
\ref foo
will point to thetypedef
, the type signature will point to theenum
. Both should point to the documentedenum
.Placing the
enum
documentation directly above theenum
itself does not change anything.bug-enum-typedef-link-example.tar.gz
Version
1.9.3 - Arch Linux x86_64 package (1.9.3-1).
The text was updated successfully, but these errors were encountered: