diff options
author | dim <dim@FreeBSD.org> | 2012-08-19 10:33:04 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-19 10:33:04 +0000 |
commit | cc73504950eb7b5dff2dded9bedd67bc36d64641 (patch) | |
tree | 5b9c2fa9d79942fbdce3d618e37e27c18263af9a /test/Sema/warn-documentation.cpp | |
parent | 554bcb69c2d785a011a30e7db87a36a87fe7db10 (diff) | |
download | FreeBSD-src-cc73504950eb7b5dff2dded9bedd67bc36d64641.zip FreeBSD-src-cc73504950eb7b5dff2dded9bedd67bc36d64641.tar.gz |
Vendor import of clang trunk r162107:
http://llvm.org/svn/llvm-project/cfe/trunk@162107
Diffstat (limited to 'test/Sema/warn-documentation.cpp')
-rw-r--r-- | test/Sema/warn-documentation.cpp | 60 |
1 files changed, 53 insertions, 7 deletions
diff --git a/test/Sema/warn-documentation.cpp b/test/Sema/warn-documentation.cpp index 16ba429..d99520b 100644 --- a/test/Sema/warn-documentation.cpp +++ b/test/Sema/warn-documentation.cpp @@ -624,13 +624,9 @@ class test_attach37 { /// \brief\author Aaa /// \tparam T Aaa void test_attach38(int aaa, int bbb); -}; -// expected-warning@+1 {{empty paragraph passed to '\brief' command}} -/// \brief\author Aaa -/// \tparam T Aaa -template<typename T> -void test_attach37<T>::test_attach38(int aaa, int bbb) {} + void test_attach39(int aaa, int bbb); +}; // expected-warning@+2 {{empty paragraph passed to '\brief' command}} // expected-warning@+2 {{template parameter 'T' not found in the template declaration}} @@ -639,6 +635,29 @@ void test_attach37<T>::test_attach38(int aaa, int bbb) {} template<> void test_attach37<int>::test_attach38(int aaa, int bbb) {} +// expected-warning@+1 {{empty paragraph passed to '\brief' command}} +/// \brief\author Aaa +/// \tparam T Aaa +template<typename T> +void test_attach37<T>::test_attach39(int aaa, int bbb) {} + +// We used to emit warning that parameter 'a' is not found because we parsed +// the comment in context of the redeclaration which does not have parameter +// names. +template <typename T> +struct test_attach38 { + /*! + \param a First param + \param b Second param + */ + template <typename B> + void test_attach39(T a, B b); +}; + +template <> +template <typename B> +void test_attach38<int>::test_attach39(int, B); + // PR13411, reduced. We used to crash on this. /** @@ -652,7 +671,7 @@ void test_nocrash1(int); /// \param\brief void test_nocrash2(int); -// PR13593 +// PR13593, example 1 and 2 /** * Bla. @@ -668,3 +687,30 @@ template <typename> void test_nocrash3() { } + +// PR13593, example 3 + +/** + * aaa + */ +template <typename T> +inline T test_nocrash5(T a1) +{ + return a1; +} + +/// +//, + +inline void test_nocrash6() +{ + test_nocrash5(1); +} + +// We used to crash on this. + +/*! + Blah. +*/ +typedef const struct test_nocrash7 * test_nocrash8; + |