Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wdocumentation -Wdocumentation-pedantic -verify %s |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 2 | |
Dmitri Gribenko | f303d4c | 2012-08-07 17:54:38 +0000 | [diff] [blame] | 3 | // This file contains lots of corner cases, so ensure that XML we generate is not invalid. |
| 4 | // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s | FileCheck %s -check-prefix=WRONG |
| 5 | // WRONG-NOT: CommentXMLInvalid |
| 6 | |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 7 | // expected-warning@+1 {{expected quoted string after equals sign}} |
| 8 | /// <a href=> |
| 9 | int test_html1(int); |
| 10 | |
| 11 | // expected-warning@+1 {{expected quoted string after equals sign}} |
| 12 | /// <a href==> |
| 13 | int test_html2(int); |
| 14 | |
| 15 | // expected-warning@+2 {{expected quoted string after equals sign}} |
Dmitri Gribenko | 3f38bf2 | 2012-07-13 00:44:24 +0000 | [diff] [blame] | 16 | // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}} |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 17 | /// <a href= blah |
| 18 | int test_html3(int); |
| 19 | |
Dmitri Gribenko | 3f38bf2 | 2012-07-13 00:44:24 +0000 | [diff] [blame] | 20 | // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}} |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 21 | /// <a => |
| 22 | int test_html4(int); |
| 23 | |
Dmitri Gribenko | 3f38bf2 | 2012-07-13 00:44:24 +0000 | [diff] [blame] | 24 | // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}} |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 25 | /// <a "aaa"> |
| 26 | int test_html5(int); |
| 27 | |
Dmitri Gribenko | 3f38bf2 | 2012-07-13 00:44:24 +0000 | [diff] [blame] | 28 | // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}} |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 29 | /// <a a="b" => |
| 30 | int test_html6(int); |
| 31 | |
Dmitri Gribenko | 3f38bf2 | 2012-07-13 00:44:24 +0000 | [diff] [blame] | 32 | // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}} |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 33 | /// <a a="b" "aaa"> |
| 34 | int test_html7(int); |
| 35 | |
Dmitri Gribenko | 3f38bf2 | 2012-07-13 00:44:24 +0000 | [diff] [blame] | 36 | // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}} |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 37 | /// <a a="b" = |
| 38 | int test_html8(int); |
| 39 | |
Dmitri Gribenko | 3f38bf2 | 2012-07-13 00:44:24 +0000 | [diff] [blame] | 40 | // expected-warning@+2 {{HTML start tag prematurely ended, expected attribute name or '>'}} expected-note@+1 {{HTML tag started here}} |
Dmitri Gribenko | 834a5bd | 2012-08-22 22:56:08 +0000 | [diff] [blame] | 41 | /** Aaa bbb<img ddd eee |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 42 | * fff ggg. |
| 43 | */ |
| 44 | int test_html9(int); |
| 45 | |
Dmitri Gribenko | 3f38bf2 | 2012-07-13 00:44:24 +0000 | [diff] [blame] | 46 | // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}} |
Dmitri Gribenko | 834a5bd | 2012-08-22 22:56:08 +0000 | [diff] [blame] | 47 | /** Aaa bbb<img ddd eee 42% |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 48 | * fff ggg. |
| 49 | */ |
| 50 | int test_html10(int); |
| 51 | |
Dmitri Gribenko | 3f38bf2 | 2012-07-13 00:44:24 +0000 | [diff] [blame] | 52 | // expected-warning@+1 {{HTML end tag 'br' is forbidden}} |
Dmitri Gribenko | 3d98698 | 2012-07-12 23:37:09 +0000 | [diff] [blame] | 53 | /// <br></br> |
| 54 | int test_html11(int); |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 55 | |
| 56 | /// <blockquote>Meow</blockquote> |
| 57 | int test_html_nesting1(int); |
| 58 | |
| 59 | /// <b><i>Meow</i></b> |
| 60 | int test_html_nesting2(int); |
| 61 | |
| 62 | /// <p>Aaa<br> |
| 63 | /// Bbb</p> |
| 64 | int test_html_nesting3(int); |
| 65 | |
| 66 | /// <p>Aaa<br /> |
| 67 | /// Bbb</p> |
| 68 | int test_html_nesting4(int); |
| 69 | |
Dmitri Gribenko | 3f38bf2 | 2012-07-13 00:44:24 +0000 | [diff] [blame] | 70 | // expected-warning@+1 {{HTML end tag does not match any start tag}} |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 71 | /// <b><i>Meow</a> |
| 72 | int test_html_nesting5(int); |
| 73 | |
Dmitri Gribenko | 3f38bf2 | 2012-07-13 00:44:24 +0000 | [diff] [blame] | 74 | // expected-warning@+2 {{HTML start tag 'i' closed by 'b'}} |
| 75 | // expected-warning@+1 {{HTML end tag does not match any start tag}} |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 76 | /// <b><i>Meow</b></b> |
| 77 | int test_html_nesting6(int); |
| 78 | |
Dmitri Gribenko | 3f38bf2 | 2012-07-13 00:44:24 +0000 | [diff] [blame] | 79 | // expected-warning@+2 {{HTML start tag 'i' closed by 'b'}} |
| 80 | // expected-warning@+1 {{HTML end tag does not match any start tag}} |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 81 | /// <b><i>Meow</b></i> |
| 82 | int test_html_nesting7(int); |
| 83 | |
| 84 | |
| 85 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 86 | /// \brief\returns Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 87 | int test_block_command1(int); |
| 88 | |
| 89 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 90 | /// \brief \returns Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 91 | int test_block_command2(int); |
| 92 | |
| 93 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
| 94 | /// \brief |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 95 | /// \returns Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 96 | int test_block_command3(int); |
| 97 | |
| 98 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
| 99 | /// \brief |
| 100 | /// |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 101 | /// \returns Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 102 | int test_block_command4(int); |
| 103 | |
| 104 | // There is trailing whitespace on one of the following lines, don't remove it! |
| 105 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
| 106 | /// \brief |
| 107 | /// |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 108 | /// \returns Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 109 | int test_block_command5(int); |
| 110 | |
Dmitri Gribenko | 858e69f | 2012-07-19 00:01:56 +0000 | [diff] [blame] | 111 | /// \brief \c Aaa |
| 112 | int test_block_command6(int); |
| 113 | |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 114 | // expected-warning@+5 {{duplicated command '\brief'}} expected-note@+1 {{previous command '\brief' here}} |
| 115 | /// \brief Aaa |
| 116 | /// |
| 117 | /// Bbb |
| 118 | /// |
| 119 | /// \brief Ccc |
| 120 | int test_duplicate_brief1(int); |
| 121 | |
| 122 | // expected-warning@+5 {{duplicated command '\short'}} expected-note@+1 {{previous command '\short' here}} |
| 123 | /// \short Aaa |
| 124 | /// |
| 125 | /// Bbb |
| 126 | /// |
| 127 | /// \short Ccc |
| 128 | int test_duplicate_brief2(int); |
| 129 | |
| 130 | // expected-warning@+5 {{duplicated command '\brief'}} expected-note@+1 {{previous command '\short' (an alias of '\brief') here}} |
| 131 | /// \short Aaa |
| 132 | /// |
| 133 | /// Bbb |
| 134 | /// |
| 135 | /// \brief Ccc |
| 136 | int test_duplicate_brief3(int); |
| 137 | |
| 138 | |
| 139 | // expected-warning@+5 {{duplicated command '\return'}} expected-note@+1 {{previous command '\return' here}} |
| 140 | /// \return Aaa |
| 141 | /// |
| 142 | /// Bbb |
| 143 | /// |
| 144 | /// \return Ccc |
| 145 | int test_duplicate_returns1(int); |
| 146 | |
| 147 | // expected-warning@+5 {{duplicated command '\returns'}} expected-note@+1 {{previous command '\returns' here}} |
| 148 | /// \returns Aaa |
| 149 | /// |
| 150 | /// Bbb |
| 151 | /// |
| 152 | /// \returns Ccc |
| 153 | int test_duplicate_returns2(int); |
| 154 | |
| 155 | // expected-warning@+5 {{duplicated command '\result'}} expected-note@+1 {{previous command '\result' here}} |
| 156 | /// \result Aaa |
| 157 | /// |
| 158 | /// Bbb |
| 159 | /// |
| 160 | /// \result Ccc |
| 161 | int test_duplicate_returns3(int); |
| 162 | |
| 163 | // expected-warning@+5 {{duplicated command '\return'}} expected-note@+1 {{previous command '\returns' (an alias of '\return') here}} |
| 164 | /// \returns Aaa |
| 165 | /// |
| 166 | /// Bbb |
| 167 | /// |
| 168 | /// \return Ccc |
| 169 | int test_duplicate_returns4(int); |
| 170 | |
| 171 | |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 172 | // expected-warning@+1 {{'\param' command used in a comment that is not attached to a function declaration}} |
| 173 | /// \param a Blah blah. |
| 174 | int test_param1; |
| 175 | |
| 176 | // expected-warning@+1 {{empty paragraph passed to '\param' command}} |
| 177 | /// \param |
| 178 | /// \param a Blah blah. |
| 179 | int test_param2(int a); |
| 180 | |
| 181 | // expected-warning@+1 {{empty paragraph passed to '\param' command}} |
| 182 | /// \param a |
| 183 | int test_param3(int a); |
| 184 | |
| 185 | /// \param a Blah blah. |
| 186 | int test_param4(int a); |
| 187 | |
| 188 | /// \param [in] a Blah blah. |
| 189 | int test_param5(int a); |
| 190 | |
| 191 | /// \param [out] a Blah blah. |
| 192 | int test_param6(int a); |
| 193 | |
| 194 | /// \param [in,out] a Blah blah. |
| 195 | int test_param7(int a); |
| 196 | |
| 197 | // expected-warning@+1 {{whitespace is not allowed in parameter passing direction}} |
| 198 | /// \param [ in ] a Blah blah. |
| 199 | int test_param8(int a); |
| 200 | |
| 201 | // expected-warning@+1 {{whitespace is not allowed in parameter passing direction}} |
| 202 | /// \param [in, out] a Blah blah. |
| 203 | int test_param9(int a); |
| 204 | |
| 205 | // expected-warning@+1 {{unrecognized parameter passing direction, valid directions are '[in]', '[out]' and '[in,out]'}} |
| 206 | /// \param [ junk] a Blah blah. |
| 207 | int test_param10(int a); |
| 208 | |
Dmitri Gribenko | 2e72104 | 2012-07-24 21:56:59 +0000 | [diff] [blame] | 209 | // expected-warning@+1 {{parameter 'a' not found in the function declaration}} |
Dmitri Gribenko | 56bf6fd | 2012-07-24 21:46:24 +0000 | [diff] [blame] | 210 | /// \param a Blah blah. |
| 211 | int test_param11(); |
| 212 | |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 213 | // expected-warning@+1 {{parameter 'A' not found in the function declaration}} expected-note@+1 {{did you mean 'a'?}} |
| 214 | /// \param A Blah blah. |
Dmitri Gribenko | 56bf6fd | 2012-07-24 21:46:24 +0000 | [diff] [blame] | 215 | int test_param12(int a); |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 216 | |
| 217 | // expected-warning@+1 {{parameter 'aab' not found in the function declaration}} expected-note@+1 {{did you mean 'aaa'?}} |
| 218 | /// \param aab Blah blah. |
Dmitri Gribenko | 56bf6fd | 2012-07-24 21:46:24 +0000 | [diff] [blame] | 219 | int test_param13(int aaa, int bbb); |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 220 | |
Dmitri Gribenko | 9edd2c8 | 2012-08-24 17:45:39 +0000 | [diff] [blame] | 221 | // expected-warning@+2 {{parameter 'aab' not found in the function declaration}} expected-note@+2 {{did you mean 'bbb'?}} |
| 222 | /// \param aaa Blah blah. |
| 223 | /// \param aab Blah blah. |
| 224 | int test_param14(int aaa, int bbb); |
| 225 | |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 226 | // expected-warning@+1 {{parameter 'aab' not found in the function declaration}} |
| 227 | /// \param aab Blah blah. |
Dmitri Gribenko | 9edd2c8 | 2012-08-24 17:45:39 +0000 | [diff] [blame] | 228 | int test_param15(int bbb, int ccc); |
| 229 | |
| 230 | // expected-warning@+1 {{parameter 'aab' not found in the function declaration}} |
| 231 | /// \param aab Ccc. |
| 232 | /// \param aaa Aaa. |
| 233 | /// \param bbb Bbb. |
| 234 | int test_param16(int aaa, int bbb); |
| 235 | |
| 236 | // expected-warning@+2 {{parameter 'aab' not found in the function declaration}} |
| 237 | /// \param aaa Aaa. |
| 238 | /// \param aab Ccc. |
| 239 | /// \param bbb Bbb. |
| 240 | int test_param17(int aaa, int bbb); |
| 241 | |
| 242 | // expected-warning@+3 {{parameter 'aab' not found in the function declaration}} |
| 243 | /// \param aaa Aaa. |
| 244 | /// \param bbb Bbb. |
| 245 | /// \param aab Ccc. |
| 246 | int test_param18(int aaa, int bbb); |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 247 | |
| 248 | class C { |
| 249 | // expected-warning@+1 {{parameter 'aaa' not found in the function declaration}} |
| 250 | /// \param aaa Blah blah. |
| 251 | C(int bbb, int ccc); |
| 252 | |
| 253 | // expected-warning@+1 {{parameter 'aaa' not found in the function declaration}} |
| 254 | /// \param aaa Blah blah. |
Dmitri Gribenko | 9edd2c8 | 2012-08-24 17:45:39 +0000 | [diff] [blame] | 255 | int test_param19(int bbb, int ccc); |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 256 | }; |
| 257 | |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 258 | // expected-warning@+1 {{parameter 'aab' not found in the function declaration}} |
| 259 | /// \param aab Blah blah. |
| 260 | template<typename T> |
Dmitri Gribenko | 9edd2c8 | 2012-08-24 17:45:39 +0000 | [diff] [blame] | 261 | void test_param20(int bbb, int ccc); |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 262 | |
Dmitri Gribenko | 6582277 | 2012-07-24 21:44:16 +0000 | [diff] [blame] | 263 | // expected-warning@+3 {{parameter 'a' is already documented}} |
| 264 | // expected-note@+1 {{previous documentation}} |
| 265 | /// \param a Aaa. |
| 266 | /// \param a Aaa. |
Dmitri Gribenko | 9edd2c8 | 2012-08-24 17:45:39 +0000 | [diff] [blame] | 267 | int test_param21(int a); |
Dmitri Gribenko | 6582277 | 2012-07-24 21:44:16 +0000 | [diff] [blame] | 268 | |
| 269 | // expected-warning@+4 {{parameter 'x2' is already documented}} |
| 270 | // expected-note@+2 {{previous documentation}} |
| 271 | /// \param x1 Aaa. |
| 272 | /// \param x2 Bbb. |
| 273 | /// \param x2 Ccc. |
Dmitri Gribenko | 9edd2c8 | 2012-08-24 17:45:39 +0000 | [diff] [blame] | 274 | int test_param22(int x1, int x2, int x3); |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 275 | |
Dmitri Gribenko | 9edd2c8 | 2012-08-24 17:45:39 +0000 | [diff] [blame] | 276 | // expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}} |
Dmitri Gribenko | 70ff109 | 2012-08-24 00:05:30 +0000 | [diff] [blame] | 277 | /// \param aaa Meow. |
| 278 | /// \param bbb Bbb. |
| 279 | /// \returns aaa. |
Dmitri Gribenko | 9edd2c8 | 2012-08-24 17:45:39 +0000 | [diff] [blame] | 280 | typedef int test_param23(int aaa, int ccc); |
Dmitri Gribenko | 70ff109 | 2012-08-24 00:05:30 +0000 | [diff] [blame] | 281 | |
Dmitri Gribenko | 9edd2c8 | 2012-08-24 17:45:39 +0000 | [diff] [blame] | 282 | // expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}} |
Dmitri Gribenko | 70ff109 | 2012-08-24 00:05:30 +0000 | [diff] [blame] | 283 | /// \param aaa Meow. |
| 284 | /// \param bbb Bbb. |
| 285 | /// \returns aaa. |
Dmitri Gribenko | 9edd2c8 | 2012-08-24 17:45:39 +0000 | [diff] [blame] | 286 | typedef int (*test_param24)(int aaa, int ccc); |
Dmitri Gribenko | 70ff109 | 2012-08-24 00:05:30 +0000 | [diff] [blame] | 287 | |
Dmitri Gribenko | 9edd2c8 | 2012-08-24 17:45:39 +0000 | [diff] [blame] | 288 | // expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}} |
Dmitri Gribenko | 70ff109 | 2012-08-24 00:05:30 +0000 | [diff] [blame] | 289 | /// \param aaa Meow. |
| 290 | /// \param bbb Bbb. |
| 291 | /// \returns aaa. |
Dmitri Gribenko | 9edd2c8 | 2012-08-24 17:45:39 +0000 | [diff] [blame] | 292 | typedef int (* const test_param25)(int aaa, int ccc); |
Dmitri Gribenko | 70ff109 | 2012-08-24 00:05:30 +0000 | [diff] [blame] | 293 | |
Dmitri Gribenko | 9edd2c8 | 2012-08-24 17:45:39 +0000 | [diff] [blame] | 294 | // expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}} |
Dmitri Gribenko | 70ff109 | 2012-08-24 00:05:30 +0000 | [diff] [blame] | 295 | /// \param aaa Meow. |
| 296 | /// \param bbb Bbb. |
| 297 | /// \returns aaa. |
Dmitri Gribenko | 9edd2c8 | 2012-08-24 17:45:39 +0000 | [diff] [blame] | 298 | typedef int (C::*test_param26)(int aaa, int ccc); |
| 299 | |
Dmitri Gribenko | ec504e0 | 2012-09-15 21:13:36 +0000 | [diff] [blame] | 300 | typedef int (*test_param27)(int aaa); |
| 301 | |
| 302 | // expected-warning@+1 {{'\param' command used in a comment that is not attached to a function declaration}} |
| 303 | /// \param aaa Meow. |
| 304 | typedef test_param27 test_param28; |
| 305 | |
Dmitri Gribenko | 151b2ac | 2013-03-04 19:39:33 +0000 | [diff] [blame] | 306 | // rdar://13066276 |
| 307 | // expected-warning@+1 {{'@param' command used in a comment that is not attached to a function declaration}} |
| 308 | /// @param aaa Meow. |
| 309 | typedef unsigned int test_param29; |
| 310 | |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 311 | |
| 312 | // expected-warning@+1 {{'\tparam' command used in a comment that is not attached to a template declaration}} |
| 313 | /// \tparam T Aaa |
| 314 | int test_tparam1; |
| 315 | |
| 316 | // expected-warning@+1 {{'\tparam' command used in a comment that is not attached to a template declaration}} |
| 317 | /// \tparam T Aaa |
| 318 | void test_tparam2(int aaa); |
| 319 | |
| 320 | // expected-warning@+1 {{empty paragraph passed to '\tparam' command}} |
| 321 | /// \tparam |
| 322 | /// \param aaa Blah blah |
| 323 | template<typename T> |
| 324 | void test_tparam3(T aaa); |
| 325 | |
| 326 | // expected-warning@+1 {{template parameter 'T' not found in the template declaration}} expected-note@+1 {{did you mean 'TT'?}} |
| 327 | /// \tparam T Aaa |
| 328 | template<typename TT> |
| 329 | void test_tparam4(TT aaa); |
| 330 | |
| 331 | // expected-warning@+1 {{template parameter 'T' not found in the template declaration}} expected-note@+1 {{did you mean 'TT'?}} |
| 332 | /// \tparam T Aaa |
| 333 | template<typename TT> |
| 334 | class test_tparam5 { |
| 335 | // expected-warning@+1 {{template parameter 'T' not found in the template declaration}} expected-note@+1 {{did you mean 'TTT'?}} |
| 336 | /// \tparam T Aaa |
| 337 | template<typename TTT> |
| 338 | void test_tparam6(TTT aaa); |
| 339 | }; |
| 340 | |
| 341 | /// \tparam T1 Aaa |
| 342 | /// \tparam T2 Bbb |
| 343 | template<typename T1, typename T2> |
| 344 | void test_tparam7(T1 aaa, T2 bbb); |
| 345 | |
| 346 | // expected-warning@+1 {{template parameter 'SomTy' not found in the template declaration}} expected-note@+1 {{did you mean 'SomeTy'?}} |
| 347 | /// \tparam SomTy Aaa |
| 348 | /// \tparam OtherTy Bbb |
| 349 | template<typename SomeTy, typename OtherTy> |
| 350 | void test_tparam8(SomeTy aaa, OtherTy bbb); |
| 351 | |
| 352 | // expected-warning@+2 {{template parameter 'T1' is already documented}} expected-note@+1 {{previous documentation}} |
| 353 | /// \tparam T1 Aaa |
| 354 | /// \tparam T1 Bbb |
| 355 | template<typename T1, typename T2> |
| 356 | void test_tparam9(T1 aaa, T2 bbb); |
| 357 | |
| 358 | /// \tparam T Aaa |
| 359 | /// \tparam TT Bbb |
| 360 | template<template<typename T> class TT> |
| 361 | void test_tparam10(TT<int> aaa); |
| 362 | |
| 363 | /// \tparam T Aaa |
| 364 | /// \tparam TT Bbb |
| 365 | /// \tparam TTT Ccc |
| 366 | template<template<template<typename T> class TT, class C> class TTT> |
| 367 | void test_tparam11(); |
| 368 | |
| 369 | /// \tparam I Aaa |
| 370 | template<int I> |
| 371 | void test_tparam12(); |
| 372 | |
Dmitri Gribenko | 967e5d7 | 2012-08-02 21:36:57 +0000 | [diff] [blame] | 373 | template<typename T, typename U> |
| 374 | class test_tparam13 { }; |
| 375 | |
| 376 | /// \tparam T Aaa |
| 377 | template<typename T> |
| 378 | using test_tparam14 = test_tparam13<T, int>; |
| 379 | |
| 380 | // expected-warning@+1 {{template parameter 'U' not found in the template declaration}} expected-note@+1 {{did you mean 'T'?}} |
| 381 | /// \tparam U Aaa |
| 382 | template<typename T> |
| 383 | using test_tparam15 = test_tparam13<T, int>; |
| 384 | |
Dmitri Gribenko | d1e5c0d | 2013-01-27 21:18:39 +0000 | [diff] [blame] | 385 | // ---- |
| 386 | |
| 387 | /// \tparam T Aaa |
| 388 | template<typename T> |
| 389 | class test_tparam16 { }; |
| 390 | |
| 391 | typedef test_tparam16<int> test_tparam17; |
| 392 | typedef test_tparam16<double> test_tparam18; |
| 393 | |
| 394 | // ---- |
| 395 | |
| 396 | template<typename T> |
| 397 | class test_tparam19; |
| 398 | |
| 399 | typedef test_tparam19<int> test_tparam20; |
| 400 | typedef test_tparam19<double> test_tparam21; |
| 401 | |
| 402 | /// \tparam T Aaa |
| 403 | template<typename T> |
| 404 | class test_tparam19 { }; |
| 405 | |
| 406 | // ---- |
| 407 | |
Dmitri Gribenko | 8cc9c9d | 2013-03-04 20:23:16 +0000 | [diff] [blame] | 408 | // expected-warning@+1 {{'@tparam' command used in a comment that is not attached to a template declaration}} |
| 409 | /// @tparam T Aaa |
| 410 | int test_tparam22; |
| 411 | |
| 412 | // ---- |
| 413 | |
Dmitri Gribenko | abcf0dc | 2012-09-13 20:36:01 +0000 | [diff] [blame] | 414 | |
| 415 | /// Aaa |
| 416 | /// \deprecated Bbb |
Dmitri Gribenko | 0bd9838 | 2012-09-22 21:47:50 +0000 | [diff] [blame] | 417 | void test_deprecated_1(int a) __attribute__((deprecated)); |
Dmitri Gribenko | abcf0dc | 2012-09-13 20:36:01 +0000 | [diff] [blame] | 418 | |
| 419 | // We don't want \deprecated to warn about empty paragraph. It is fine to use |
| 420 | // \deprecated by itself without explanations. |
| 421 | |
| 422 | /// Aaa |
| 423 | /// \deprecated |
Dmitri Gribenko | 0bd9838 | 2012-09-22 21:47:50 +0000 | [diff] [blame] | 424 | void test_deprecated_2(int a) __attribute__((deprecated)); |
| 425 | |
| 426 | /// Aaa |
| 427 | /// \deprecated |
| 428 | void test_deprecated_3(int a) __attribute__((availability(macosx,introduced=10.4))); |
| 429 | |
| 430 | /// Aaa |
| 431 | /// \deprecated |
| 432 | void test_deprecated_4(int a) __attribute__((unavailable)); |
| 433 | |
| 434 | // expected-warning@+2 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note@+3 {{add a deprecation attribute to the declaration to silence this warning}} |
| 435 | /// Aaa |
| 436 | /// \deprecated |
| 437 | void test_deprecated_5(int a); |
| 438 | |
| 439 | // expected-warning@+2 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note@+3 {{add a deprecation attribute to the declaration to silence this warning}} |
| 440 | /// Aaa |
| 441 | /// \deprecated |
| 442 | void test_deprecated_6(int a) { |
| 443 | } |
| 444 | |
| 445 | // expected-warning@+2 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} |
| 446 | /// Aaa |
| 447 | /// \deprecated |
| 448 | template<typename T> |
| 449 | void test_deprecated_7(T aaa); |
Dmitri Gribenko | abcf0dc | 2012-09-13 20:36:01 +0000 | [diff] [blame] | 450 | |
| 451 | |
Dmitri Gribenko | 151b2ac | 2013-03-04 19:39:33 +0000 | [diff] [blame] | 452 | // rdar://12397511 |
| 453 | // expected-note@+2 {{previous command '\headerfile' here}} |
| 454 | // expected-warning@+2 {{duplicated command '\headerfile'}} |
| 455 | /// \headerfile "" |
| 456 | /// \headerfile foo.h |
| 457 | int test__headerfile_1(int a); |
| 458 | |
| 459 | |
Dmitri Gribenko | 388a594 | 2012-09-14 15:37:29 +0000 | [diff] [blame] | 460 | /// \invariant aaa |
| 461 | void test_invariant_1(int a); |
| 462 | |
| 463 | // expected-warning@+1 {{empty paragraph passed to '\invariant' command}} |
| 464 | /// \invariant |
| 465 | void test_invariant_2(int a); |
| 466 | |
| 467 | |
Dmitri Gribenko | 89ab7d0 | 2012-08-03 21:15:32 +0000 | [diff] [blame] | 468 | // no-warning |
| 469 | /// \returns Aaa |
| 470 | int test_returns_right_decl_1(int); |
| 471 | |
| 472 | class test_returns_right_decl_2 { |
| 473 | // no-warning |
| 474 | /// \returns Aaa |
| 475 | int test_returns_right_decl_3(int); |
| 476 | }; |
| 477 | |
| 478 | // no-warning |
| 479 | /// \returns Aaa |
| 480 | template<typename T> |
| 481 | int test_returns_right_decl_4(T aaa); |
| 482 | |
| 483 | // no-warning |
| 484 | /// \returns Aaa |
| 485 | template<> |
| 486 | int test_returns_right_decl_4(int aaa); |
| 487 | |
| 488 | /// \returns Aaa |
| 489 | template<typename T> |
| 490 | T test_returns_right_decl_5(T aaa); |
| 491 | |
Dmitri Gribenko | 88815f3 | 2012-08-06 16:29:26 +0000 | [diff] [blame] | 492 | // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}} |
Dmitri Gribenko | 89ab7d0 | 2012-08-03 21:15:32 +0000 | [diff] [blame] | 493 | /// \returns Aaa |
| 494 | int test_returns_wrong_decl_1; |
| 495 | |
Dmitri Gribenko | 88815f3 | 2012-08-06 16:29:26 +0000 | [diff] [blame] | 496 | // expected-warning@+1 {{'\return' command used in a comment that is not attached to a function or method declaration}} |
Dmitri Gribenko | 89ab7d0 | 2012-08-03 21:15:32 +0000 | [diff] [blame] | 497 | /// \return Aaa |
| 498 | int test_returns_wrong_decl_2; |
| 499 | |
Dmitri Gribenko | 88815f3 | 2012-08-06 16:29:26 +0000 | [diff] [blame] | 500 | // expected-warning@+1 {{'\result' command used in a comment that is not attached to a function or method declaration}} |
Dmitri Gribenko | 89ab7d0 | 2012-08-03 21:15:32 +0000 | [diff] [blame] | 501 | /// \result Aaa |
| 502 | int test_returns_wrong_decl_3; |
| 503 | |
Dmitri Gribenko | 88815f3 | 2012-08-06 16:29:26 +0000 | [diff] [blame] | 504 | // expected-warning@+1 {{'\returns' command used in a comment that is attached to a function returning void}} |
Dmitri Gribenko | 89ab7d0 | 2012-08-03 21:15:32 +0000 | [diff] [blame] | 505 | /// \returns Aaa |
| 506 | void test_returns_wrong_decl_4(int); |
| 507 | |
Dmitri Gribenko | 88815f3 | 2012-08-06 16:29:26 +0000 | [diff] [blame] | 508 | // expected-warning@+1 {{'\returns' command used in a comment that is attached to a function returning void}} |
Dmitri Gribenko | 89ab7d0 | 2012-08-03 21:15:32 +0000 | [diff] [blame] | 509 | /// \returns Aaa |
| 510 | template<typename T> |
| 511 | void test_returns_wrong_decl_5(T aaa); |
| 512 | |
Dmitri Gribenko | 88815f3 | 2012-08-06 16:29:26 +0000 | [diff] [blame] | 513 | // expected-warning@+1 {{'\returns' command used in a comment that is attached to a function returning void}} |
Dmitri Gribenko | 89ab7d0 | 2012-08-03 21:15:32 +0000 | [diff] [blame] | 514 | /// \returns Aaa |
| 515 | template<> |
| 516 | void test_returns_wrong_decl_5(int aaa); |
| 517 | |
Dmitri Gribenko | 88815f3 | 2012-08-06 16:29:26 +0000 | [diff] [blame] | 518 | // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}} |
Dmitri Gribenko | 89ab7d0 | 2012-08-03 21:15:32 +0000 | [diff] [blame] | 519 | /// \returns Aaa |
| 520 | struct test_returns_wrong_decl_6 { }; |
| 521 | |
Dmitri Gribenko | 88815f3 | 2012-08-06 16:29:26 +0000 | [diff] [blame] | 522 | // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}} |
Dmitri Gribenko | 89ab7d0 | 2012-08-03 21:15:32 +0000 | [diff] [blame] | 523 | /// \returns Aaa |
| 524 | class test_returns_wrong_decl_7 { |
| 525 | // expected-warning@+1 {{'\returns' command used in a comment that is attached to a constructor}} |
| 526 | /// \returns Aaa |
| 527 | test_returns_wrong_decl_7(); |
| 528 | |
| 529 | // expected-warning@+1 {{'\returns' command used in a comment that is attached to a destructor}} |
| 530 | /// \returns Aaa |
| 531 | ~test_returns_wrong_decl_7(); |
| 532 | }; |
| 533 | |
Dmitri Gribenko | 88815f3 | 2012-08-06 16:29:26 +0000 | [diff] [blame] | 534 | // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}} |
Dmitri Gribenko | 89ab7d0 | 2012-08-03 21:15:32 +0000 | [diff] [blame] | 535 | /// \returns Aaa |
| 536 | enum test_returns_wrong_decl_8 { |
Dmitri Gribenko | 88815f3 | 2012-08-06 16:29:26 +0000 | [diff] [blame] | 537 | // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}} |
Dmitri Gribenko | 89ab7d0 | 2012-08-03 21:15:32 +0000 | [diff] [blame] | 538 | /// \returns Aaa |
| 539 | test_returns_wrong_decl_9 |
| 540 | }; |
| 541 | |
Dmitri Gribenko | 88815f3 | 2012-08-06 16:29:26 +0000 | [diff] [blame] | 542 | // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}} |
Dmitri Gribenko | 89ab7d0 | 2012-08-03 21:15:32 +0000 | [diff] [blame] | 543 | /// \returns Aaa |
| 544 | namespace test_returns_wrong_decl_10 { }; |
| 545 | |
Dmitri Gribenko | 151b2ac | 2013-03-04 19:39:33 +0000 | [diff] [blame] | 546 | // rdar://13066276 |
| 547 | // expected-warning@+1 {{'@returns' command used in a comment that is not attached to a function or method declaration}} |
| 548 | /// @returns Aaa |
| 549 | typedef unsigned int test_returns_wrong_decl_11; |
| 550 | |
Fariborz Jahanian | bca9788 | 2013-03-05 19:40:47 +0000 | [diff] [blame] | 551 | // rdar://13094352 |
Fariborz Jahanian | 99a7057 | 2013-03-05 22:46:07 +0000 | [diff] [blame] | 552 | // expected-warning@+1 {{'@function' command should be used in a comment attached to a function declaration}} |
Fariborz Jahanian | bca9788 | 2013-03-05 19:40:47 +0000 | [diff] [blame] | 553 | /*! @function test_function |
| 554 | */ |
| 555 | typedef unsigned int Base64Flags; |
| 556 | unsigned test_function(Base64Flags inFlags); |
| 557 | |
Fariborz Jahanian | 99a7057 | 2013-03-05 22:46:07 +0000 | [diff] [blame] | 558 | // expected-warning@+1 {{'@callback' command should be used in a comment attached to a pointer to function declaration}} |
Fariborz Jahanian | bca9788 | 2013-03-05 19:40:47 +0000 | [diff] [blame] | 559 | /*! @callback test_callback |
| 560 | */ |
| 561 | typedef unsigned int BaseFlags; |
| 562 | unsigned (*test_callback)(BaseFlags inFlags); |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 563 | |
Dmitri Gribenko | 36cbbe9 | 2012-11-18 00:30:31 +0000 | [diff] [blame] | 564 | // expected-warning@+1 {{'\endverbatim' command does not terminate a verbatim text block}} |
| 565 | /// \endverbatim |
| 566 | int test_verbatim_1(); |
| 567 | |
| 568 | // expected-warning@+1 {{'\endcode' command does not terminate a verbatim text block}} |
| 569 | /// \endcode |
| 570 | int test_verbatim_2(); |
| 571 | |
| 572 | // FIXME: we give a bad diagnostic here because we throw away non-documentation |
| 573 | // comments early. |
| 574 | // |
NAKAMURA Takumi | bf823c0 | 2012-11-18 02:34:33 +0000 | [diff] [blame] | 575 | // expected-warning@+3 {{'\endcode' command does not terminate a verbatim text block}} |
Dmitri Gribenko | 36cbbe9 | 2012-11-18 00:30:31 +0000 | [diff] [blame] | 576 | /// \code |
| 577 | // foo |
| 578 | /// \endcode |
| 579 | int test_verbatim_3(); |
| 580 | |
| 581 | |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 582 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 583 | int test1; ///< \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 584 | |
| 585 | // expected-warning@+2 {{empty paragraph passed to '\brief' command}} |
| 586 | // expected-warning@+2 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 587 | int test2, ///< \brief\author Aaa |
| 588 | test3; ///< \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 589 | |
| 590 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
| 591 | int test4; ///< \brief |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 592 | ///< \author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 593 | |
| 594 | |
| 595 | // Check that we attach the comment to the declaration during parsing in the |
| 596 | // following cases. The test is based on the fact that we don't parse |
| 597 | // documentation comments that are not attached to anything. |
| 598 | |
| 599 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 600 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 601 | int test_attach1; |
| 602 | |
| 603 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 604 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 605 | int test_attach2(int); |
| 606 | |
| 607 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 608 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 609 | struct test_attach3 { |
| 610 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 611 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 612 | int test_attach4; |
| 613 | |
| 614 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 615 | int test_attach5; ///< \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 616 | |
| 617 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 618 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 619 | int test_attach6(int); |
| 620 | }; |
| 621 | |
| 622 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 623 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 624 | class test_attach7 { |
| 625 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 626 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 627 | int test_attach8; |
| 628 | |
| 629 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 630 | int test_attach9; ///< \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 631 | |
| 632 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 633 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 634 | int test_attach10(int); |
| 635 | }; |
| 636 | |
| 637 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 638 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 639 | enum test_attach9 { |
| 640 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 641 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 642 | test_attach10, |
| 643 | |
| 644 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 645 | test_attach11 ///< \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 646 | }; |
| 647 | |
| 648 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 649 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 650 | struct test_noattach12 *test_attach13; |
| 651 | |
| 652 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 653 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 654 | typedef struct test_noattach14 *test_attach15; |
| 655 | |
| 656 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 657 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 658 | typedef struct test_attach16 { int a; } test_attach17; |
| 659 | |
| 660 | struct S { int a; }; |
| 661 | |
| 662 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 663 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 664 | struct S *test_attach18; |
| 665 | |
| 666 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 667 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 668 | typedef struct S *test_attach19; |
| 669 | |
| 670 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 671 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 672 | struct test_attach20; |
| 673 | |
| 674 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 675 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 676 | typedef struct test_attach21 { |
| 677 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 678 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 679 | int test_attach22; |
| 680 | } test_attach23; |
| 681 | |
| 682 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 683 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 684 | namespace test_attach24 { |
| 685 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 686 | /// \brief\author Aaa |
Dmitri Gribenko | a5ef44f | 2012-07-11 21:38:39 +0000 | [diff] [blame] | 687 | namespace test_attach25 { |
| 688 | } |
| 689 | } |
| 690 | |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 691 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 692 | /// \brief\author Aaa |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 693 | /// \tparam T Aaa |
| 694 | template<typename T> |
| 695 | void test_attach26(T aaa); |
| 696 | |
| 697 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 698 | /// \brief\author Aaa |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 699 | /// \tparam T Aaa |
| 700 | template<typename T, typename U> |
| 701 | void test_attach27(T aaa, U bbb); |
| 702 | |
| 703 | // expected-warning@+2 {{empty paragraph passed to '\brief' command}} |
| 704 | // expected-warning@+2 {{template parameter 'T' not found in the template declaration}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 705 | /// \brief\author Aaa |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 706 | /// \tparam T Aaa |
| 707 | template<> |
| 708 | void test_attach27(int aaa, int bbb); |
| 709 | |
| 710 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 711 | /// \brief\author Aaa |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 712 | /// \tparam T Aaa |
| 713 | template<typename T> |
| 714 | class test_attach28 { |
| 715 | T aaa; |
| 716 | }; |
| 717 | |
| 718 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 719 | /// \brief\author Aaa |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 720 | using test_attach29 = test_attach28<int>; |
| 721 | |
| 722 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 723 | /// \brief\author Aaa |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 724 | /// \tparam T Aaa |
| 725 | template<typename T, typename U> |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 726 | class test_attach30 { }; |
| 727 | |
| 728 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 729 | /// \brief\author Aaa |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 730 | /// \tparam T Aaa |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 731 | template<typename T> |
| 732 | class test_attach30<T, int> { }; |
| 733 | |
| 734 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 735 | /// \brief\author Aaa |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 736 | template<> |
| 737 | class test_attach30<int, int> { }; |
| 738 | |
| 739 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 740 | /// \brief\author Aaa |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 741 | template<typename T> |
| 742 | using test_attach31 = test_attach30<T, int>; |
| 743 | |
| 744 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 745 | /// \brief\author Aaa |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 746 | /// \tparam T Aaa |
| 747 | template<typename T, typename U, typename V> |
| 748 | class test_attach32 { }; |
| 749 | |
| 750 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 751 | /// \brief\author Aaa |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 752 | /// \tparam T Aaa |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 753 | template<typename T, typename U> |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 754 | class test_attach32<T, U, int> { }; |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 755 | |
| 756 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 757 | /// \brief\author Aaa |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 758 | /// \tparam T Aaa |
| 759 | template<typename T> |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 760 | class test_attach32<T, int, int> { }; |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 761 | |
| 762 | // expected-warning@+2 {{empty paragraph passed to '\brief' command}} |
| 763 | // expected-warning@+2 {{template parameter 'T' not found in the template declaration}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 764 | /// \brief\author Aaa |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 765 | /// \tparam T Aaa |
| 766 | template<> |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 767 | class test_attach32<int, int, int> { }; |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 768 | |
| 769 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 770 | /// \brief\author Aaa |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 771 | class test_attach33 { |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 772 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 773 | /// \brief\author Aaa |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 774 | /// \tparam T Aaa |
| 775 | template<typename T, typename U> |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 776 | void test_attach34(T aaa, U bbb); |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 777 | }; |
| 778 | |
| 779 | template<typename T> |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 780 | class test_attach35 { |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 781 | // expected-warning@+2 {{empty paragraph passed to '\brief' command}} |
| 782 | // expected-warning@+2 {{template parameter 'T' not found in the template declaration}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 783 | /// \brief\author Aaa |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 784 | /// \tparam T Aaa |
| 785 | template<typename TT, typename UU> |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 786 | void test_attach36(TT aaa, UU bbb); |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 787 | }; |
| 788 | |
| 789 | // expected-warning@+2 {{empty paragraph passed to '\brief' command}} |
| 790 | // expected-warning@+2 {{template parameter 'T' not found in the template declaration}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 791 | /// \brief\author Aaa |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 792 | /// \tparam T Aaa |
| 793 | template<> template<> |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 794 | void test_attach35<int>::test_attach36(int aaa, int bbb) {} |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 795 | |
| 796 | template<typename T> |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 797 | class test_attach37 { |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 798 | // expected-warning@+2 {{empty paragraph passed to '\brief' command}} |
| 799 | // expected-warning@+2 {{'\tparam' command used in a comment that is not attached to a template declaration}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 800 | /// \brief\author Aaa |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 801 | /// \tparam T Aaa |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 802 | void test_attach38(int aaa, int bbb); |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 803 | |
Dmitri Gribenko | c41ace9 | 2012-08-14 17:17:18 +0000 | [diff] [blame] | 804 | void test_attach39(int aaa, int bbb); |
| 805 | }; |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 806 | |
| 807 | // expected-warning@+2 {{empty paragraph passed to '\brief' command}} |
| 808 | // expected-warning@+2 {{template parameter 'T' not found in the template declaration}} |
Dmitri Gribenko | 9443c57 | 2012-08-06 17:08:27 +0000 | [diff] [blame] | 809 | /// \brief\author Aaa |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 810 | /// \tparam T Aaa |
| 811 | template<> |
Dmitri Gribenko | c27bc80 | 2012-08-02 20:49:51 +0000 | [diff] [blame] | 812 | void test_attach37<int>::test_attach38(int aaa, int bbb) {} |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 813 | |
Dmitri Gribenko | c41ace9 | 2012-08-14 17:17:18 +0000 | [diff] [blame] | 814 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
| 815 | /// \brief\author Aaa |
| 816 | /// \tparam T Aaa |
| 817 | template<typename T> |
| 818 | void test_attach37<T>::test_attach39(int aaa, int bbb) {} |
| 819 | |
Dmitri Gribenko | 1599eac | 2012-08-16 18:19:43 +0000 | [diff] [blame] | 820 | // We used to emit warning that parameter 'a' is not found because we parsed |
| 821 | // the comment in context of the redeclaration which does not have parameter |
| 822 | // names. |
| 823 | template <typename T> |
| 824 | struct test_attach38 { |
| 825 | /*! |
| 826 | \param a First param |
| 827 | \param b Second param |
| 828 | */ |
| 829 | template <typename B> |
| 830 | void test_attach39(T a, B b); |
| 831 | }; |
| 832 | |
| 833 | template <> |
| 834 | template <typename B> |
| 835 | void test_attach38<int>::test_attach39(int, B); |
Dmitri Gribenko | c41ace9 | 2012-08-14 17:17:18 +0000 | [diff] [blame] | 836 | |
Dmitri Gribenko | 96b0986 | 2012-07-31 22:37:06 +0000 | [diff] [blame] | 837 | |
Dmitri Gribenko | 9f08f49 | 2012-07-20 20:18:53 +0000 | [diff] [blame] | 838 | // PR13411, reduced. We used to crash on this. |
| 839 | /** |
| 840 | * @code Aaa. |
| 841 | */ |
| 842 | void test_nocrash1(int); |
| 843 | |
Dmitri Gribenko | e5deb79 | 2012-07-30 18:05:28 +0000 | [diff] [blame] | 844 | // We used to crash on this. |
| 845 | // expected-warning@+2 {{empty paragraph passed to '\param' command}} |
| 846 | // expected-warning@+1 {{empty paragraph passed to '\brief' command}} |
| 847 | /// \param\brief |
| 848 | void test_nocrash2(int); |
| 849 | |
Dmitri Gribenko | c41ace9 | 2012-08-14 17:17:18 +0000 | [diff] [blame] | 850 | // PR13593, example 1 and 2 |
Douglas Gregor | cd81df2 | 2012-08-13 16:37:30 +0000 | [diff] [blame] | 851 | |
| 852 | /** |
| 853 | * Bla. |
| 854 | */ |
| 855 | template <typename> |
| 856 | void test_nocrash3(); |
| 857 | |
| 858 | /// Foo |
| 859 | template <typename, typename> |
| 860 | void test_nocrash4() { } |
| 861 | |
| 862 | template <typename> |
| 863 | void test_nocrash3() |
| 864 | { |
| 865 | } |
Dmitri Gribenko | c41ace9 | 2012-08-14 17:17:18 +0000 | [diff] [blame] | 866 | |
| 867 | // PR13593, example 3 |
| 868 | |
| 869 | /** |
| 870 | * aaa |
| 871 | */ |
| 872 | template <typename T> |
| 873 | inline T test_nocrash5(T a1) |
| 874 | { |
| 875 | return a1; |
| 876 | } |
| 877 | |
| 878 | /// |
| 879 | //, |
| 880 | |
| 881 | inline void test_nocrash6() |
| 882 | { |
| 883 | test_nocrash5(1); |
| 884 | } |
| 885 | |
| 886 | // We used to crash on this. |
| 887 | |
| 888 | /*! |
| 889 | Blah. |
| 890 | */ |
| 891 | typedef const struct test_nocrash7 * test_nocrash8; |
| 892 | |
Dmitri Gribenko | b0b8a96 | 2012-09-11 19:22:03 +0000 | [diff] [blame] | 893 | // We used to crash on this. |
| 894 | |
Fariborz Jahanian | ad6fd9f | 2013-05-03 23:15:20 +0000 | [diff] [blame] | 895 | // expected-warning@+1 {{unknown command tag name}} |
Dmitri Gribenko | b0b8a96 | 2012-09-11 19:22:03 +0000 | [diff] [blame] | 896 | /// aaa \unknown aaa \unknown aaa |
| 897 | int test_nocrash9; |
| 898 | |
Dmitri Gribenko | 1044256 | 2013-01-26 00:36:14 +0000 | [diff] [blame] | 899 | // We used to crash on this. PR15068 |
| 900 | |
Fariborz Jahanian | c98e913 | 2013-03-01 22:51:30 +0000 | [diff] [blame] | 901 | // expected-warning@+2 {{empty paragraph passed to '@param' command}} |
| 902 | // expected-warning@+2 {{empty paragraph passed to '@param' command}} |
Dmitri Gribenko | 1044256 | 2013-01-26 00:36:14 +0000 | [diff] [blame] | 903 | ///@param x |
| 904 | ///@param y |
| 905 | int test_nocrash10(int x, int y); |
| 906 | |
Fariborz Jahanian | c98e913 | 2013-03-01 22:51:30 +0000 | [diff] [blame] | 907 | // expected-warning@+2 {{empty paragraph passed to '@param' command}} expected-warning@+2 {{parameter 'x' not found in the function declaration}} |
| 908 | // expected-warning@+2 {{empty paragraph passed to '@param' command}} expected-warning@+2 {{parameter 'y' not found in the function declaration}} |
Dmitri Gribenko | 1044256 | 2013-01-26 00:36:14 +0000 | [diff] [blame] | 909 | ///@param x |
| 910 | ///@param y |
| 911 | int test_nocrash11(); |
| 912 | |
Fariborz Jahanian | c98e913 | 2013-03-01 22:51:30 +0000 | [diff] [blame] | 913 | // expected-warning@+3 {{empty paragraph passed to '@param' command}} expected-warning@+3 {{parameter 'x' not found in the function declaration}} |
| 914 | // expected-warning@+3 {{empty paragraph passed to '@param' command}} expected-warning@+3 {{parameter 'y' not found in the function declaration}} |
Dmitri Gribenko | 1044256 | 2013-01-26 00:36:14 +0000 | [diff] [blame] | 915 | /** |
| 916 | @param x |
| 917 | @param y |
| 918 | **/ |
| 919 | int test_nocrash12(); |
| 920 | |
Fariborz Jahanian | c98e913 | 2013-03-01 22:51:30 +0000 | [diff] [blame] | 921 | // expected-warning@+2 {{empty paragraph passed to '@param' command}} |
| 922 | // expected-warning@+1 {{empty paragraph passed to '@param' command}} |
Dmitri Gribenko | 1044256 | 2013-01-26 00:36:14 +0000 | [diff] [blame] | 923 | ///@param x@param y |
| 924 | int test_nocrash13(int x, int y); |
Fariborz Jahanian | 28c1cd2 | 2013-03-07 23:33:11 +0000 | [diff] [blame] | 925 | |
| 926 | // rdar://12379114 |
| 927 | // expected-warning@+2 {{'@union' command should not be used in a comment attached to a non-union declaration}} |
| 928 | /*! |
| 929 | @union U This is new |
| 930 | */ |
| 931 | struct U { int iS; }; |
| 932 | |
| 933 | /*! |
| 934 | @union U1 |
| 935 | */ |
| 936 | union U1 {int i; }; |
| 937 | |
| 938 | // expected-warning@+2 {{'@struct' command should not be used in a comment attached to a non-struct declaration}} |
| 939 | /*! |
| 940 | @struct S2 |
| 941 | */ |
| 942 | union S2 {}; |
| 943 | |
| 944 | /*! |
| 945 | @class C1 |
| 946 | */ |
| 947 | class C1; |
| 948 | |
| 949 | /*! |
| 950 | @struct S3; |
| 951 | */ |
| 952 | class S3; |
Fariborz Jahanian | 2d588b4 | 2013-06-19 18:08:03 +0000 | [diff] [blame^] | 953 | |
| 954 | // rdar://14124702 |
| 955 | //---------------------------------------------------------------------- |
| 956 | /// @class Predicate Predicate.h "lldb/Host/Predicate.h" |
| 957 | /// @brief A C++ wrapper class for providing threaded access to a value |
| 958 | /// of type T. |
| 959 | /// |
| 960 | /// A templatized class. |
| 961 | /// specified values. |
| 962 | //---------------------------------------------------------------------- |
| 963 | template <class T, class T1> |
| 964 | class Predicate |
| 965 | { |
| 966 | }; |
| 967 | |
| 968 | //---------------------------------------------------------------------- |
| 969 | /// @class Predicate<int, char> Predicate.h "lldb/Host/Predicate.h" |
| 970 | /// @brief A C++ wrapper class for providing threaded access to a value |
| 971 | /// of type T. |
| 972 | /// |
| 973 | /// A template specilization class. |
| 974 | //---------------------------------------------------------------------- |
| 975 | template<> class Predicate<int, char> |
| 976 | { |
| 977 | }; |
| 978 | |
| 979 | //---------------------------------------------------------------------- |
| 980 | /// @class Predicate<T, int> Predicate.h "lldb/Host/Predicate.h" |
| 981 | /// @brief A C++ wrapper class for providing threaded access to a value |
| 982 | /// of type T. |
| 983 | /// |
| 984 | /// A partial specialization template class. |
| 985 | //---------------------------------------------------------------------- |
| 986 | template<class T> class Predicate<T, int> |
| 987 | { |
| 988 | }; |
| 989 | |
| 990 | /*! @function test_function |
| 991 | */ |
| 992 | template <class T> T test_function (T arg); |
| 993 | |
| 994 | /*! @function test_function<int> |
| 995 | */ |
| 996 | template <> int test_function<int> (int arg); |