diff options
Diffstat (limited to 'test/Sema/warn-documentation-fixits.cpp')
-rw-r--r-- | test/Sema/warn-documentation-fixits.cpp | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/test/Sema/warn-documentation-fixits.cpp b/test/Sema/warn-documentation-fixits.cpp index a47b776..675d86c 100644 --- a/test/Sema/warn-documentation-fixits.cpp +++ b/test/Sema/warn-documentation-fixits.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -verify %s -// RUN: %clang_cc1 -fsyntax-only -Wdocumentation -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +// 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 // expected-warning@+1 {{parameter 'ZZZZZZZZZZ' not found in the function declaration}} expected-note@+1 {{did you mean 'a'?}} /// \param ZZZZZZZZZZ Blah blah. @@ -57,6 +57,24 @@ struct test_deprecated_6 { /// \deprecated void test_deprecated_9(int a); +// rdar://12381408 +// expected-warning@+2 {{unknown command tag name 'retur'; did you mean 'return'?}} +/// \brief testing fixit +/// \retur int in FooBar +int FooBar(); + +// expected-warning@+1 {{unknown command tag name 'fooba'; did you mean 'foobar'?}} +/// \fooba bbb IS_DOXYGEN_END +int gorf(); + +/// \t bbb IS_DOXYGEN_END +int Bar(); + +// expected-warning@+2 {{unknown command tag name 'encode'; did you mean 'endcode'?}} +// expected-warning@+1 {{'\endcode' command does not terminate a verbatim text block}} +/// \encode PR18051 +int PR18051(); + // CHECK: fix-it:"{{.*}}":{5:12-5:22}:"a" // CHECK: fix-it:"{{.*}}":{9:12-9:15}:"aaa" // CHECK: fix-it:"{{.*}}":{13:13-13:23}:"T" @@ -68,4 +86,6 @@ void test_deprecated_9(int a); // CHECK: fix-it:"{{.*}}":{46:27-46:27}:" __attribute__((deprecated))" // CHECK: fix-it:"{{.*}}":{50:27-50:27}:" __attribute__((deprecated))" // 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" |