Skip to content
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

[platform] Update doxygen comments #4233

Merged
merged 13 commits into from
May 4, 2017
Merged

Conversation

sg-
Copy link
Contributor

@sg- sg- commented Apr 26, 2017

Description

Fix warnings and errors when building API docs in the mbed-os/platform directory using doxygen. Still a rouge warning that I haven't yet gotten to the bottom of but other eyes are welcome. Doxyfile attached that is used to build this (matches the developer site settings)

doxyfile-developer.txt

C:\dev\mbed-os>doxygen doxyfile-developer
deprecated:11: warning: explicit link request to 'type' could not be resolved
deprecated:14: warning: explicit link request to 'type' could not be resolved
deprecated:17: warning: explicit link request to 'type' could not be resolved
deprecated:53: warning: explicit link request to 'type' could not be resolved
deprecated:83: warning: explicit link request to 'type' could not be resolved
deprecated:86: warning: explicit link request to 'type' could not be resolved
deprecated:89: warning: explicit link request to 'type' could not be resolved
deprecated:92: warning: explicit link request to 'type' could not be resolved
deprecated:173: warning: explicit link request to 'type' could not be resolved
deprecated:176: warning: explicit link request to 'type' could not be resolved
deprecated:179: warning: explicit link request to 'type' could not be resolved
deprecated:182: warning: explicit link request to 'type' could not be resolved
deprecated:227: warning: explicit link request to 'type' could not be resolved
deprecated:230: warning: explicit link request to 'type' could not be resolved
deprecated:233: warning: explicit link request to 'type' could not be resolved
deprecated:251: warning: explicit link request to 'type' could not be resolved
deprecated:305: warning: explicit link request to 'type' could not be resolved
deprecated:311: warning: explicit link request to 'type' could not be resolved
deprecated:314: warning: explicit link request to 'type' could not be resolved
deprecated:317: warning: explicit link request to 'type' could not be resolved
deprecated:338: warning: explicit link request to 'type' could not be resolved
deprecated:362: warning: explicit link request to 'type' could not be resolved
deprecated:380: warning: explicit link request to 'type' could not be resolved
deprecated:383: warning: explicit link request to 'type' could not be resolved

C:\dev\mbed-os>

Status

IN DEVELOPMENT

@theotherjimmy
Copy link
Contributor

The errors seem to be caused by use of enable_if template parameters like this. @pan- @geky You guys were able to come up with something on the last doxygen related PR. Maybe you could magic us more C++ foo solutions?

This is required to allow doxygen to properly parse the function
declarations, otherwise it gets confused around the nested templates.
@geky
Copy link
Contributor

geky commented Apr 28, 2017

The best magic I could come up with was to just move the sfinae logic out into a macro that doxygen ignores. It seems like doxygen was having issues with the nested templates?

@0xc0170
Copy link
Contributor

0xc0170 commented May 2, 2017

Still needs work? No error anymore?

@theotherjimmy
Copy link
Contributor

@0xc0170 You are correct, it no longer needs work, and may be marked ready for review.

Thanks for the bump.

@sg-
Copy link
Contributor Author

sg- commented May 2, 2017

Pulled the change and looks to still have the same problem

#define MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, M)                            \
    typename detail::enable_if<                                             \
            detail::is_type<M, &F::operator()>::value &&                    \
            sizeof(F) <= sizeof(uintptr_t)                                  \
        >::newnew = detail::nil()

C:\dev\mbed-os>doxygen doxyfile-developer
deprecated:11: warning: explicit link request to 'newnew' could not be resolved
deprecated:14: warning: explicit link request to 'newnew' could not be resolved
deprecated:17: warning: explicit link request to 'newnew' could not be resolved
deprecated:53: warning: explicit link request to 'newnew' could not be resolved
deprecated:83: warning: explicit link request to 'newnew' could not be resolved
deprecated:86: warning: explicit link request to 'newnew' could not be resolved
deprecated:89: warning: explicit link request to 'newnew' could not be resolved
deprecated:92: warning: explicit link request to 'newnew' could not be resolved
deprecated:173: warning: explicit link request to 'newnew' could not be resolved
deprecated:176: warning: explicit link request to 'newnew' could not be resolved
deprecated:179: warning: explicit link request to 'newnew' could not be resolved
deprecated:182: warning: explicit link request to 'newnew' could not be resolved
deprecated:227: warning: explicit link request to 'newnew' could not be resolved
deprecated:230: warning: explicit link request to 'newnew' could not be resolved
deprecated:233: warning: explicit link request to 'newnew' could not be resolved
deprecated:251: warning: explicit link request to 'newnew' could not be resolved
deprecated:305: warning: explicit link request to 'newnew' could not be resolved
deprecated:311: warning: explicit link request to 'newnew' could not be resolved
deprecated:314: warning: explicit link request to 'newnew' could not be resolved
deprecated:317: warning: explicit link request to 'newnew' could not be resolved
deprecated:338: warning: explicit link request to 'newnew' could not be resolved
deprecated:362: warning: explicit link request to 'newnew' could not be resolved
deprecated:380: warning: explicit link request to 'newnew' could not be resolved
deprecated:383: warning: explicit link request to 'newnew' could not be resolved

@geky
Copy link
Contributor

geky commented May 2, 2017

Oh! @sg- did we add the macro to the doxygen config as well?

- "PREDEFINED": "DOXYGEN_ONLY \"MBED_DEPRECATED_SINCE(f, g)=\"",
+ "PREDEFINED": "DOXYGEN_ONLY \"MBED_DEPRECATED_SINCE(f, g)=\" \"MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, M)=\"",

Macro used to eliminate nested template which doxygen has a problem
with.
@sg-
Copy link
Contributor Author

sg- commented May 2, 2017

@geky Good catch. OK this looks good now.

C:\dev\mbed-os>doxygen doxyfile-developer

C:\dev\mbed-os>

@adbridge
Copy link
Contributor

adbridge commented May 5, 2017

This PR relies on changes introduced in #3867 which is targeted for 5.5.0 , thus re-targeting this one also to 5.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants