Author: sberg Date: Tue Aug 20 01:36:21 2019 New Revision: 369345 URL: http://llvm.org/viewvc/llvm-project?rev=369345&view=rev Log: Rudimentary support for Doxygen \retval command
...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). Differential Revision: https://reviews.llvm.org/D66350 Modified: cfe/trunk/include/clang/AST/CommentCommands.td cfe/trunk/test/Sema/warn-documentation.cpp Modified: cfe/trunk/include/clang/AST/CommentCommands.td URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CommentCommands.td?rev=369345&r1=369344&r2=369345&view=diff ============================================================================== --- cfe/trunk/include/clang/AST/CommentCommands.td (original) +++ cfe/trunk/include/clang/AST/CommentCommands.td Tue Aug 20 01:36:21 2019 @@ -139,6 +139,7 @@ def Post : BlockCommand<"post">; 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">; Modified: cfe/trunk/test/Sema/warn-documentation.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/warn-documentation.cpp?rev=369345&r1=369344&r2=369345&view=diff ============================================================================== --- cfe/trunk/test/Sema/warn-documentation.cpp (original) +++ cfe/trunk/test/Sema/warn-documentation.cpp Tue Aug 20 01:36:21 2019 @@ -288,6 +288,11 @@ int test_param21(int a); /// \param x2 Ccc. int test_param22(int x1, int x2, int x3); +// expected-warning@+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. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits