| 1 |
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wdocumentation-unknown-command -verify %s |
| 2 |
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Werror -Wno-documentation-unknown-command %s |
| 3 |
|
| 4 |
// expected-warning@+1 {{unknown command tag name}} |
| 5 |
/// aaa \unknown |
| 6 |
int test_unknown_comand_1; |
| 7 |
|
| 8 |
// expected-warning@+1 {{unknown command tag name 'retur'; did you mean 'return'?}} |
| 9 |
/// \retur aaa |
| 10 |
int test_unknown_comand_2(); |
| 11 |
|
| 12 |
/// We don't recognize commands in double quotes: "\n\t @unknown2". |
| 13 |
int test_unknown_comand_3(); |
| 14 |
|
| 15 |
// expected-warning@+2 {{unknown command tag name}} |
| 16 |
// expected-warning@+2 {{unknown command tag name}} |
| 17 |
/// But it has to be a single line: "\unknown3 |
| 18 |
/// @unknown4" (Doxygen treats multi-line quotes inconsistently.) |
| 19 |
int test_unknown_comand_4(); |
| 20 |
|
| 21 |
// RUN: c-index-test -test-load-source all -Wdocumentation-unknown-command %s > /dev/null 2> %t.err |
| 22 |
// RUN: FileCheck < %t.err -check-prefix=CHECK-RANGE %s |
| 23 |
// CHECK-RANGE: warn-documentation-unknown-command.cpp:5:9:{5:9-5:17}: warning: unknown command tag name |
| 24 |
// CHECK-RANGE: warn-documentation-unknown-command.cpp:9:5:{9:5-9:11}: warning: unknown command tag name 'retur'; did you mean 'return'? |