DiagnosticCommentKinds.td revision 263508
1//==--- DiagnosticCommentKinds.td - diagnostics related to comments -------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10let Component = "Comment" in {
11let CategoryName = "Documentation Issue" in {
12
13// HTML parsing errors.  These are under -Wdocumentation to make sure the user
14// knows that we didn't parse something as he might expect.
15
16def warn_doc_html_start_tag_expected_quoted_string : Warning<
17  "expected quoted string after equals sign">,
18  InGroup<Documentation>, DefaultIgnore;
19
20def warn_doc_html_start_tag_expected_ident_or_greater : Warning<
21  "HTML start tag prematurely ended, expected attribute name or '>'">,
22  InGroup<Documentation>, DefaultIgnore;
23
24def note_doc_html_tag_started_here : Note<
25  "HTML tag started here">;
26
27// HTML semantic errors
28
29def warn_doc_html_end_forbidden : Warning<
30  "HTML end tag '%0' is forbidden">,
31  InGroup<DocumentationHTML>, DefaultIgnore;
32
33def warn_doc_html_end_unbalanced : Warning<
34  "HTML end tag does not match any start tag">,
35  InGroup<DocumentationHTML>, DefaultIgnore;
36
37def warn_doc_html_start_end_mismatch : Warning<
38  "HTML start tag '%0' closed by '%1'">,
39  InGroup<DocumentationHTML>, DefaultIgnore;
40
41def note_doc_html_end_tag : Note<
42  "end tag">;
43
44// Commands
45
46def warn_doc_block_command_empty_paragraph : Warning<
47  "empty paragraph passed to '%select{\\|@}0%1' command">,
48  InGroup<Documentation>, DefaultIgnore;
49
50def warn_doc_block_command_duplicate : Warning<
51  "duplicated command '%select{\\|@}0%1'">,
52  InGroup<Documentation>, DefaultIgnore;
53
54def note_doc_block_command_previous : Note<
55  "previous command '%select{\\|@}0%1' here">;
56
57def note_doc_block_command_previous_alias : Note<
58  "previous command '%select{\\|@}0%1' (an alias of '\\%2') here">;
59
60// \param command
61
62def warn_doc_param_invalid_direction : Warning<
63  "unrecognized parameter passing direction, "
64  "valid directions are '[in]', '[out]' and '[in,out]'">,
65  InGroup<Documentation>, DefaultIgnore;
66
67def warn_doc_param_spaces_in_direction : Warning<
68  "whitespace is not allowed in parameter passing direction">,
69  InGroup<DocumentationPedantic>, DefaultIgnore;
70
71def warn_doc_param_not_attached_to_a_function_decl : Warning<
72  "'%select{\\|@}0param' command used in a comment that is not attached to "
73  "a function declaration">,
74  InGroup<Documentation>, DefaultIgnore;
75
76def warn_doc_function_method_decl_mismatch : Warning<
77  "'%select{\\|@}0%select{function|functiongroup|method|methodgroup|callback}1' "
78  "command should be used in a comment attached to "
79  "%select{a function|a function|an Objective-C method|an Objective-C method|"
80  "a pointer to function}2 declaration">,
81  InGroup<Documentation>, DefaultIgnore;
82  
83def warn_doc_api_container_decl_mismatch : Warning<
84  "'%select{\\|@}0%select{class|interface|protocol|struct|union}1' "
85  "command should not be used in a comment attached to a "
86  "non-%select{class|interface|protocol|struct|union}2 declaration">,
87  InGroup<Documentation>, DefaultIgnore;
88  
89def warn_doc_container_decl_mismatch : Warning<
90  "'%select{\\|@}0%select{classdesign|coclass|dependency|helper"
91  "|helperclass|helps|instancesize|ownership|performance|security|superclass}1' "
92  "command should not be used in a comment attached to a non-container declaration">,
93  InGroup<Documentation>, DefaultIgnore;
94  
95def warn_doc_param_duplicate : Warning<
96  "parameter '%0' is already documented">,
97  InGroup<Documentation>, DefaultIgnore;
98
99def note_doc_param_previous : Note<
100  "previous documentation">;
101
102def warn_doc_param_not_found : Warning<
103  "parameter '%0' not found in the function declaration">,
104  InGroup<Documentation>, DefaultIgnore;
105
106def note_doc_param_name_suggestion : Note<
107  "did you mean '%0'?">;
108
109// tparam command
110
111def warn_doc_tparam_not_attached_to_a_template_decl : Warning<
112  "'%select{\\|@}0tparam' command used in a comment that is not attached to "
113  "a template declaration">,
114  InGroup<Documentation>, DefaultIgnore;
115
116def warn_doc_tparam_duplicate : Warning<
117  "template parameter '%0' is already documented">,
118  InGroup<Documentation>, DefaultIgnore;
119
120def note_doc_tparam_previous : Note<
121  "previous documentation">;
122
123def warn_doc_tparam_not_found : Warning<
124  "template parameter '%0' not found in the template declaration">,
125  InGroup<Documentation>, DefaultIgnore;
126
127def note_doc_tparam_name_suggestion : Note<
128  "did you mean '%0'?">;
129
130// \returns command
131
132def warn_doc_returns_not_attached_to_a_function_decl : Warning<
133  "'%select{\\|@}0%1' command used in a comment that is not attached to "
134  "a function or method declaration">,
135  InGroup<Documentation>, DefaultIgnore;
136
137def warn_doc_returns_attached_to_a_void_function : Warning<
138  "'%select{\\|@}0%1' command used in a comment that is attached to a "
139  "%select{function returning void|constructor|destructor|"
140  "method returning void}2">,
141  InGroup<Documentation>, DefaultIgnore;
142
143// \deprecated command
144
145def warn_doc_deprecated_not_sync : Warning<
146  "declaration is marked with '\\deprecated' command but does not have "
147  "a deprecation attribute">,
148  InGroup<DocumentationDeprecatedSync>, DefaultIgnore;
149
150def note_add_deprecation_attr : Note<
151  "add a deprecation attribute to the declaration to silence this warning">;
152
153// verbatim block commands
154
155def warn_verbatim_block_end_without_start : Warning<
156  "'%select{\\|@}0%1' command does not terminate a verbatim text block">,
157  InGroup<Documentation>, DefaultIgnore;
158
159def warn_unknown_comment_command_name : Warning<
160  "unknown command tag name">,
161  InGroup<DocumentationUnknownCommand>, DefaultIgnore;
162
163def warn_correct_comment_command_name : Warning<
164  "unknown command tag name '%0'; did you mean '%1'?">,
165  InGroup<Documentation>, DefaultIgnore;
166
167} // end of documentation issue category
168} // end of AST component
169