Debian Codegraph @

clang/test/Index/comment-misc-tags.m

raw
1 // RUN: rm -rf %t
2 // RUN: mkdir %t
3 // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s > %t/out
4 // RUN: FileCheck %s < %t/out
5
6 /*!
7 @interface IOCommandGate
8 @brief This is a brief
9 @abstract Single-threaded work-loop client request mechanism.
10 @discussion An IOCommandGate instance is an extremely light weight mechanism that
11 executes an action on the driver's work-loop...
12 @textblock
13 Many discussions about text
14 Many1 discussions about text
15 Many2 discussions about text
16 @/textblock
17 @link //un_ref/c/func/function_name link text goes here @/link
18 @see //un_ref/doc/uid/XX0000011 I/O Kit Fundamentals
19 @seealso //k_ref/doc/uid/XX30000905-CH204 Programming
20 */
21 @interface IOCommandGate
22 @end
23
24 // CHECK: (CXComment_BlockCommand CommandName=[abstract]
25 // CHECK-NEXT: (CXComment_Paragraph
26 // CHECK-NEXT: (CXComment_Text Text=[ Single-threaded work-loop client request mechanism.] HasTrailingNewline)
27 // CHECK: (CXComment_BlockCommand CommandName=[discussion]
28 // CHECK-NEXT: (CXComment_Paragraph
29 // CHECK-NEXT: (CXComment_Text Text=[ An IOCommandGate instance is an extremely light weight mechanism that] HasTrailingNewline)
30 // CHECK-NEXT: (CXComment_Text Text=[ executes an action on the driver's work-loop...] HasTrailingNewline)
31 // CHECK: (CXComment_VerbatimBlockCommand CommandName=[textblock]
32 // CHECK-NEXT: (CXComment_VerbatimBlockLine Text=[ Many discussions about text])
33 // CHECK-NEXT: (CXComment_VerbatimBlockLine Text=[ Many1 discussions about text])
34 // CHECK-NEXT: (CXComment_VerbatimBlockLine Text=[ Many2 discussions about text]))
35 // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
36
37 // CHECK: (CXComment_VerbatimBlockCommand CommandName=[link]
38 // CHECK-NEXT: (CXComment_VerbatimBlockLine Text=[ //un_ref/c/func/function_name link text goes here ]))
39 // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
40 // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
41 // CHECK: (CXComment_BlockCommand CommandName=[see]
42 // CHECK-NEXT: (CXComment_Paragraph
43 // CHECK-NEXT: (CXComment_Text Text=[ //un_ref/doc/uid/XX0000011 I/O Kit Fundamentals] HasTrailingNewline)
44 // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
45 // CHECK: (CXComment_BlockCommand CommandName=[seealso]
46 // CHECK-NEXT: (CXComment_Paragraph
47 // CHECK-NEXT: (CXComment_Text Text=[ //k_ref/doc/uid/XX30000905-CH204 Programming])
48
49 /*!
50 \arg \c AlignLeft left alignment.
51 \li \c AlignRight right alignment.
52
53 No other types of alignment are supported.
54 */
55 struct S {
56 int AlignLeft;
57 int AlignRight;
58 };
59
60 // CHECK: (CXComment_BlockCommand CommandName=[arg]
61 // CHECK-NEXT: (CXComment_Paragraph
62 // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
63 // CHECK-NEXT: (CXComment_InlineCommand CommandName=[c] RenderMonospaced Arg[0]=AlignLeft)
64 // CHECK-NEXT: (CXComment_Text Text=[ left alignment.] HasTrailingNewline)))
65 // CHECK: (CXComment_BlockCommand CommandName=[li]
66 // CHECK-NEXT: (CXComment_Paragraph
67 // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
68 // CHECK-NEXT: (CXComment_InlineCommand CommandName=[c] RenderMonospaced Arg[0]=AlignRight)
69 // CHECK-NEXT: (CXComment_Text Text=[ right alignment.])))
70 // CHECK: (CXComment_Paragraph
71 // CHECK-NEXT: (CXComment_Text Text=[ No other types of alignment are supported.]))
72
73 /*! \struct Test
74 * Normal text.
75 *
76 * \par User defined paragraph:
77 * Contents of the paragraph.
78 *
79 * \par
80 * New paragraph under the same heading.
81 *
82 * \note
83 * This note consists of two paragraphs.
84 * This is the first paragraph.
85 *
86 * \par
87 * And this is the second paragraph.
88 *
89 * More normal text.
90 */
91
92 struct Test {int filler;};
93
94 // CHECK: (CXComment_BlockCommand CommandName=[par] Arg[0]=User defined paragraph:
95 // CHECK-NEXT: (CXComment_Paragraph
96 // CHECK-NEXT: (CXComment_Text Text=[ Contents of the paragraph.])))
97 // CHECK: (CXComment_BlockCommand CommandName=[par]
98 // CHECK-NEXT: (CXComment_Paragraph
99 // CHECK-NEXT: (CXComment_Text Text=[New paragraph under the same heading.])))
100 // CHECK: (CXComment_BlockCommand CommandName=[note]
101 // CHECK-NEXT: (CXComment_Paragraph
102 // CHECK-NEXT: (CXComment_Text Text=[ This note consists of two paragraphs.] HasTrailingNewline)
103 // CHECK-NEXT: (CXComment_Text Text=[ This is the first paragraph.])))
104 // CHECK: (CXComment_BlockCommand CommandName=[par]
105 // CHECK-NEXT: (CXComment_Paragraph
106 // CHECK-NEXT: (CXComment_Text Text=[And this is the second paragraph.])))