aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-04-10 23:10:42 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-04-10 23:10:42 +0000
commit75dbdfa6f80bf6b35d858b6557e9fbb2854e2ba0 (patch)
treef448dbd5355851f59c8a23475a6c186c456f9abe
parent01e446be51ef61f9e0c8b58e2255d4d1a1439028 (diff)
comment parsing. Add couple more needed doxygen tags.
// rdar://12379053 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179238 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/CommentCommands.td2
-rw-r--r--test/Index/comment-misc-tags.m25
2 files changed, 27 insertions, 0 deletions
diff --git a/include/clang/AST/CommentCommands.td b/include/clang/AST/CommentCommands.td
index b166cd6860..6712e76471 100644
--- a/include/clang/AST/CommentCommands.td
+++ b/include/clang/AST/CommentCommands.td
@@ -121,6 +121,7 @@ def Headerfile : BlockCommand<"headerfile"> { let IsHeaderfileCommand = 1; }
// We don't do any additional semantic analysis for the following
// BlockCommands. It might be a good idea to do something extra for them, but
// for now we model them as plain BlockCommands.
+def Arg : BlockCommand<"arg">;
def Attention : BlockCommand<"attention">;
def Author : BlockCommand<"author">;
def Authors : BlockCommand<"authors">;
@@ -128,6 +129,7 @@ def Bug : BlockCommand<"bug">;
def Copyright : BlockCommand<"copyright">;
def Date : BlockCommand<"date">;
def Invariant : BlockCommand<"invariant">;
+def Li : BlockCommand<"li">;
def Note : BlockCommand<"note">;
def Post : BlockCommand<"post">;
def Pre : BlockCommand<"pre">;
diff --git a/test/Index/comment-misc-tags.m b/test/Index/comment-misc-tags.m
index f1ca418b57..426102d374 100644
--- a/test/Index/comment-misc-tags.m
+++ b/test/Index/comment-misc-tags.m
@@ -46,3 +46,28 @@
// CHECK: (CXComment_BlockCommand CommandName=[seealso]
// CHECK-NEXT: (CXComment_Paragraph
// CHECK-NEXT: (CXComment_Text Text=[ //k_ref/doc/uid/XX30000905-CH204 Programming] HasTrailingNewline)
+
+// rdar://12379053
+/*!
+\arg \c AlignLeft left alignment.
+\li \c AlignRight right alignment.
+
+ No other types of alignment are supported.
+*/
+struct S {
+ int AlignLeft;
+ int AlignRight;
+};
+
+// CHECK: (CXComment_BlockCommand CommandName=[arg]
+// CHECK-NEXT: (CXComment_Paragraph
+// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
+// CHECK-NEXT: (CXComment_InlineCommand CommandName=[c] RenderMonospaced Arg[0]=AlignLeft)
+// CHECK-NEXT: (CXComment_Text Text=[ left alignment.] HasTrailingNewline)))
+// CHECK: (CXComment_BlockCommand CommandName=[li]
+// CHECK-NEXT: (CXComment_Paragraph
+// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
+// CHECK-NEXT: (CXComment_InlineCommand CommandName=[c] RenderMonospaced Arg[0]=AlignRight)
+// CHECK-NEXT: (CXComment_Text Text=[ right alignment.])))
+// CHECK: (CXComment_Paragraph
+// CHECK-NEXT: (CXComment_Text Text=[ No other types of alignment are supported.]))