This is an archive of the discontinued LLVM Phabricator instance.

Correct Doxygen syntax for inline code
ClosedPublic

Authored by aaronpuchert on Mar 15 2021, 3:52 PM.

Details

Summary

There is no syntax like {@code ...} in Doxygen, @code is a block command
that ends with @endcode, and generally these are not enclosed in braces.
The correct syntax for inline code snippets is @c <code>.

Diff Detail

Event Timeline

aaronpuchert created this revision.Mar 15 2021, 3:52 PM
aaronpuchert requested review of this revision.Mar 15 2021, 3:52 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 15 2021, 3:52 PM
aaron.ballman accepted this revision.Mar 16 2021, 6:20 AM

LGTM! I wonder if this is something our -Wdocumentation should warn about?

This revision is now accepted and ready to land.Mar 16 2021, 6:20 AM

LGTM! I wonder if this is something our -Wdocumentation should warn about?

Interestingly we warn about the opposite problem:

/// @endcode
int x;

produces "warning: '@endcode' command does not terminate a verbatim text block [-Wdocumentation]".

Maybe we're deliberately not doing this because it would be too annoying, not sure. Maybe @gribozavr2 knows that.

This revision was landed with ongoing or failed builds.Mar 16 2021, 7:18 AM
This revision was automatically updated to reflect the committed changes.