[PATCH] D75632: Comment parsing: Treat \ref as inline command
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 4 11:47:56 PST 2020
aaronpuchert created this revision.
aaronpuchert added a reviewer: gribozavr2.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
It's basically Doxygen's version of a link and can happen anywhere
inside of a paragraph. Fixes a bogus warning about empty paragraphs when
a parameter description starts with a link.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D75632
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
@@ -294,6 +294,9 @@
/// \retval 0 Blah blah.
int test_param23(int a);
+/// \param a \ref test_param23 has an empty paragraph, this doesn't.
+int test_param24(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
@@ -87,6 +87,7 @@
def A : InlineCommand<"a">;
def E : InlineCommand<"e">;
def Em : InlineCommand<"em">;
+def Ref : InlineCommand<"ref">;
def Anchor : InlineCommand<"anchor">;
//===----------------------------------------------------------------------===//
@@ -205,7 +206,6 @@
def Mainpage : VerbatimLineCommand<"mainpage">;
def Subpage : VerbatimLineCommand<"subpage">;
-def Ref : VerbatimLineCommand<"ref">;
def Relates : VerbatimLineCommand<"relates">;
def Related : VerbatimLineCommand<"related">;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75632.248264.patch
Type: text/x-patch
Size: 1268 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200304/2b6f2c75/attachment-0001.bin>
More information about the cfe-commits
mailing list