From: Dmitri Gribenko Date: Sat, 9 Nov 2013 03:50:37 +0000 (+0000) Subject: Comment parsing: recognize \def (but processing is a no-op, like the rest of X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c31fbe34c9cc9d7fcf4e5d6d79e27835cdefc716;p=clang Comment parsing: recognize \def (but processing is a no-op, like the rest of similar commands that duplicate the declaration name) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194312 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/CommentCommands.td b/include/clang/AST/CommentCommands.td index 56944add2a..4942430a06 100644 --- a/include/clang/AST/CommentCommands.td +++ b/include/clang/AST/CommentCommands.td @@ -210,6 +210,7 @@ def RelatedAlso : VerbatimLineCommand<"relatedalso">; //===----------------------------------------------------------------------===// // Doxygen commands. +def Def : DeclarationVerbatimLineCommand<"def">; def Fn : DeclarationVerbatimLineCommand<"fn">; def Namespace : DeclarationVerbatimLineCommand<"namespace">; def Overload : DeclarationVerbatimLineCommand<"overload">; diff --git a/test/Index/comment-to-html-xml-conversion.cpp b/test/Index/comment-to-html-xml-conversion.cpp index 9a7cd9af9b..94e6570864 100644 --- a/test/Index/comment-to-html-xml-conversion.cpp +++ b/test/Index/comment-to-html-xml-conversion.cpp @@ -457,10 +457,17 @@ void comment_to_html_conversion_25(); // CHECK-NEXT: (CXComment_VerbatimBlockLine Text=[ Aaa]) // CHECK-NEXT: (CXComment_VerbatimBlockLine Text=[ Aaa])))] -/// \function foo -/// \class foo -/// \method foo -/// \interface foo +/// \def foo_def +/// \fn foo_fn +/// \namespace foo_namespace +/// \overload foo_overload +/// \property foo_property +/// \typedef foo_typedef +/// \var foo_var +/// \function foo_function +/// \class foo_class +/// \method foo_method +/// \interface foo_interface /// Blah blah. void comment_to_html_conversion_26(); @@ -469,16 +476,37 @@ void comment_to_html_conversion_26(); // CHECK-NEXT: (CXComment_FullComment // CHECK-NEXT: (CXComment_Paragraph IsWhitespace // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) -// CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo]) +// CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_def]) // CHECK-NEXT: (CXComment_Paragraph IsWhitespace // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) -// CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo]) +// CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_fn]) // CHECK-NEXT: (CXComment_Paragraph IsWhitespace // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) -// CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo]) +// CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_namespace]) // CHECK-NEXT: (CXComment_Paragraph IsWhitespace // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) -// CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo]) +// CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_overload]) +// CHECK-NEXT: (CXComment_Paragraph IsWhitespace +// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) +// CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_property]) +// CHECK-NEXT: (CXComment_Paragraph IsWhitespace +// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) +// CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_typedef]) +// CHECK-NEXT: (CXComment_Paragraph IsWhitespace +// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) +// CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_var]) +// CHECK-NEXT: (CXComment_Paragraph IsWhitespace +// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) +// CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_function]) +// CHECK-NEXT: (CXComment_Paragraph IsWhitespace +// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) +// CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_class]) +// CHECK-NEXT: (CXComment_Paragraph IsWhitespace +// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) +// CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_method]) +// CHECK-NEXT: (CXComment_Paragraph IsWhitespace +// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) +// CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_interface]) // CHECK-NEXT: (CXComment_Paragraph // CHECK-NEXT: (CXComment_Text Text=[ Blah blah.])))]