Avoid empty \retval in Doxygen documentation to pacify Clang 15 #7096
Labels
component-psa
PSA keystore/dispatch layer (storage, drivers, …)
enhancement
size-s
Estimated task size: small (~2d)
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.The text was updated successfully, but these errors were encountered: