diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2015-03-17 18:03:42 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2015-03-17 18:03:42 +0000 |
commit | 7fe22f66d073d30de7be26b91bc4d64deaa46ec9 (patch) | |
tree | a145c7d759cc854398e3eefc1e995b75611ed980 /clang/test | |
parent | 24fcae8fa03ee609d2f8e65b028a6198ba2a2411 (diff) | |
download | bcm5719-llvm-7fe22f66d073d30de7be26b91bc4d64deaa46ec9.tar.gz bcm5719-llvm-7fe22f66d073d30de7be26b91bc4d64deaa46ec9.zip |
Comment parsing: move a diagnostic to the correct group.
Based on a patch by LE GARREC Vincent.
llvm-svn: 232511
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Sema/warn-documentation-fixits.cpp | 7 | ||||
-rw-r--r-- | clang/test/Sema/warn-documentation-unknown-command.cpp | 11 |
2 files changed, 15 insertions, 3 deletions
diff --git a/clang/test/Sema/warn-documentation-fixits.cpp b/clang/test/Sema/warn-documentation-fixits.cpp index 675d86c366d..95c0e935075 100644 --- a/clang/test/Sema/warn-documentation-fixits.cpp +++ b/clang/test/Sema/warn-documentation-fixits.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -fcomment-block-commands=foobar -verify %s -// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -fcomment-block-commands=foobar -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -Wdocumentation-pedantic -fcomment-block-commands=foobar -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -Wdocumentation-pedantic -fcomment-block-commands=foobar -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s // expected-warning@+1 {{parameter 'ZZZZZZZZZZ' not found in the function declaration}} expected-note@+1 {{did you mean 'a'?}} /// \param ZZZZZZZZZZ Blah blah. @@ -67,6 +67,7 @@ int FooBar(); /// \fooba bbb IS_DOXYGEN_END int gorf(); +// expected-warning@+1 {{unknown command tag name}} /// \t bbb IS_DOXYGEN_END int Bar(); @@ -88,4 +89,4 @@ int PR18051(); // CHECK: fix-it:"{{.*}}":{58:30-58:30}:" MY_ATTR_DEPRECATED" // CHECK: fix-it:"{{.*}}":{63:6-63:11}:"return" // CHECK: fix-it:"{{.*}}":{67:6-67:11}:"foobar" -// CHECK: fix-it:"{{.*}}":{75:6-75:12}:"endcode" +// CHECK: fix-it:"{{.*}}":{76:6-76:12}:"endcode" diff --git a/clang/test/Sema/warn-documentation-unknown-command.cpp b/clang/test/Sema/warn-documentation-unknown-command.cpp new file mode 100644 index 00000000000..3674a9c6801 --- /dev/null +++ b/clang/test/Sema/warn-documentation-unknown-command.cpp @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wdocumentation-unknown-command -verify %s +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Werror -Wno-documentation-unknown-command %s + +// expected-warning@+1 {{unknown command tag name}} +/// aaa \unknown +int test_unknown_comand_1; + +// expected-warning@+1 {{unknown command tag name 'retur'; did you mean 'return'?}} +/// \retur aaa +int test_unknown_comand_2(); + |