Comment parsing: Treat \ref as inline command

Summary:
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.

Reviewers: gribozavr2

Reviewed By: gribozavr2

Differential Revision: https://reviews.llvm.org/D75632
This commit is contained in:
Aaron Puchert 2020-03-05 19:24:28 +01:00
parent 85c0b34fc5
commit f23df1b2a3
2 changed files with 4 additions and 1 deletions

View File

@ -87,6 +87,7 @@ def P : InlineCommand<"p">;
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 Paragraph : VerbatimLineCommand<"paragraph">;
def Mainpage : VerbatimLineCommand<"mainpage">;
def Subpage : VerbatimLineCommand<"subpage">;
def Ref : VerbatimLineCommand<"ref">;
def Relates : VerbatimLineCommand<"relates">;
def Related : VerbatimLineCommand<"related">;

View File

@ -294,6 +294,9 @@ int test_param22(int x1, int x2, int x3);
/// \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.