Reputation: 185
During reading LLVM source code, I find something different in comments, e.g.
/// If \p DebugLogging is true, we'll log our progress to llvm::dbgs().
What does \p
means here?
Upvotes: 3
Views: 1060
Reputation: 882078
LLVM uses Doxygen for generating documentation, the ///
marker is one of the many ways of creating a special comment block that Doxygen will parse to form documentation.
Within a special comment block, \p
is simply one of the mark-up commands, this particular one renders the following word in typewriter font (fixed rather than proportional). The \c
option is an alias for the same thing.
Upvotes: 4
Reputation: 34
I agree . These seems to be Doxygen commands to format typewritten fonts but since its in comments its not showing the 'font format' but the character itself.
Comments are not touched or processed by Doxygen. They have their own formatting. The /c /p precedes some important keywords (methods, members, parameters etc) only and not arbitrary. The author in all good intentions wanted people to identify the keywords but in comments, all are equal.
Upvotes: -1
Reputation: 11317
3 slashes is one of the ways that doxygen comments are identified. The \p tag has some meaning, see it's documentation: https://www.doxygen.nl/manual/commands.html#cmdp
Displays the parameter using a typewriter font. You can use this command to refer to member function parameters in the running text.
Upvotes: 1