diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-11-18 00:30:31 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-11-18 00:30:31 +0000 |
commit | 76b91c3431115a88d013c47839d7c5189da08b28 (patch) | |
tree | 609509769bdb7bb2375b5ef0cf801f2517c438b0 /clang/test | |
parent | a01d4cfff2f6728b5600836d6a6a650d380c1b62 (diff) | |
download | bcm5719-llvm-76b91c3431115a88d013c47839d7c5189da08b28.tar.gz bcm5719-llvm-76b91c3431115a88d013c47839d7c5189da08b28.zip |
Documentation parsing: propely handle a lone '\endverbatim' and emit a warning.
We actually used to assert on this.
Thanks to NAKAMURA Takumi for noticing this!
llvm-svn: 168277
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Sema/warn-documentation.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/Sema/warn-documentation.cpp b/clang/test/Sema/warn-documentation.cpp index b5d3300efd0..3eca3c8dc1b 100644 --- a/clang/test/Sema/warn-documentation.cpp +++ b/clang/test/Sema/warn-documentation.cpp @@ -502,6 +502,24 @@ enum test_returns_wrong_decl_8 { namespace test_returns_wrong_decl_10 { }; +// expected-warning@+1 {{'\endverbatim' command does not terminate a verbatim text block}} +/// \endverbatim +int test_verbatim_1(); + +// expected-warning@+1 {{'\endcode' command does not terminate a verbatim text block}} +/// \endcode +int test_verbatim_2(); + +// FIXME: we give a bad diagnostic here because we throw away non-documentation +// comments early. +// +// expected-warning@+2 {{'\endcode' command does not terminate a verbatim text block}} +/// \code +// foo +/// \endcode +int test_verbatim_3(); + + // expected-warning@+1 {{empty paragraph passed to '\brief' command}} int test1; ///< \brief\author Aaa |