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

Avoid empty \retval in Doxygen documentation to pacify Clang 15 #7096

Closed
gilles-peskine-arm opened this issue Feb 14, 2023 · 0 comments · Fixed by #7098
Closed

Avoid empty \retval in Doxygen documentation to pacify Clang 15 #7096

gilles-peskine-arm opened this issue Feb 14, 2023 · 0 comments · Fixed by #7098
Assignees
Labels
component-psa PSA keystore/dispatch layer (storage, drivers, …) enhancement size-s Estimated task size: small (~2d)

Comments

@gilles-peskine-arm
Copy link
Contributor

As reported in #6960, in Clang ≥15.0.0, the -Wdocumentation warning rejects \retval statements with an empty description. (Older versions reject empty \return and \param statements with empty descriptions, but that doesn't affect our code base. Clang 15 added this restriction to \retval.)

Doxygen itself is happy about an empty description (the documentation doesn't say anything about description documentation needing to be non-empty, the tool doesn't complain, and the tool produces sensible output). So I think Clang should not complain, but we have to live with the fact that it does.

Having an empty description for \retval statements makes sense. We do often this in PSA code, to document which error statuses a function can return. Often there's nothing to add to the generic description of the error code.

In #6966, we're disabling -Wdocumentation when building with Clang ≥15. This is not nice, since we're losing diagnostics that we would want (clang -Wdocumentation warns about many mismatches between the Doxygen documentation and the C prototype which Doxygen doesn't have enough information to check.).

The goal of this task is to work around this Clang limitation: every \retval must have a non-empty description. When we do this, revert #6966.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-psa PSA keystore/dispatch layer (storage, drivers, …) enhancement size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant