[llvm] [llvm] Update policy for Doxygen comments in the Coding Standards (PR #179898)
Felipe de Azevedo Piovezan via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 5 02:07:56 PST 2026
================
@@ -278,11 +278,23 @@ Use the ``\file`` command to turn the standard file header into a file-level
comment.
Include descriptive paragraphs for all public interfaces (public classes,
-member and non-member functions). Avoid restating the information that can
-be inferred from the API name. The first sentence (or a paragraph beginning
-with ``\brief``) is used as an abstract. Try to use a single sentence as the
-``\brief`` adds visual clutter. Put detailed discussion into separate
-paragraphs.
+member and non-member functions). Avoid restating the information that can be
+inferred from the API name or signature. The first sentence (or a paragraph
+beginning with ``\brief``) is used as an abstract. Try to use a single
+sentence as the ``\brief`` adds visual clutter. Put detailed discussion into
+separate paragraphs.
+
+A minimal documentation comment:
+
+.. code-block:: c++
+
+ /// Sets the xyzzy property to \p Baz.
+ void setXyzzy(bool Baz);
+
+Only include code examples, function parameters and return values when it
+provides addtional information, such as intent, usage, or behavior that’s
+non-obvious. Avoid restating information that can easily be inferred from the
+function signature.
----------------
felipepiovezan wrote:
This last sentence is repeated on the first paragraph. Is this intentional?
https://github.com/llvm/llvm-project/pull/179898
More information about the llvm-commits
mailing list