[PATCH] D66350: Rudimentary support for Doxygen \retval command
Stephan Bergmann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 16 07:35:20 PDT 2019
sberg created this revision.
sberg added a reviewer: gribozavr.
sberg added a project: clang.
Herald added a subscriber: cfe-commits.
...so that at least a preceding \param etc. that lacks a description gets a -Wdocumentation warning (instead of erroneously treating the \retval ... text as its paragraph).
Repository:
rC Clang
https://reviews.llvm.org/D66350
Files:
clang/include/clang/AST/CommentCommands.td
clang/test/Sema/warn-documentation.cpp
Index: clang/test/Sema/warn-documentation.cpp
===================================================================
--- clang/test/Sema/warn-documentation.cpp
+++ clang/test/Sema/warn-documentation.cpp
@@ -288,6 +288,11 @@
/// \param x2 Ccc.
int test_param22(int x1, int x2, int x3);
+// expected-warning at +1 {{empty paragraph passed to '\param' command}}
+/// \param a
+/// \retval 0 Blah blah.
+int test_param23(int a);
+
//===---
// Test that we treat typedefs to some non-function types as functions for the
// purposes of documentation comment parsing.
Index: clang/include/clang/AST/CommentCommands.td
===================================================================
--- clang/include/clang/AST/CommentCommands.td
+++ clang/include/clang/AST/CommentCommands.td
@@ -139,6 +139,7 @@
def Pre : BlockCommand<"pre">;
def Remark : BlockCommand<"remark">;
def Remarks : BlockCommand<"remarks">;
+def Retval : BlockCommand<"retval">;
def Sa : BlockCommand<"sa">;
def See : BlockCommand<"see">;
def Since : BlockCommand<"since">;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66350.215599.patch
Type: text/x-patch
Size: 1078 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190816/4a5fcf48/attachment-0001.bin>
More information about the cfe-commits
mailing list