aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/warn-documentation.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-08-16 18:19:43 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-08-16 18:19:43 +0000
commit1599eac40a3b28de0824013dc2fb90551dfa01b0 (patch)
tree1da207820664fe5e46d1d8664c84518ca12fb00d /test/Sema/warn-documentation.cpp
parent27762243921cd0b8105b7ee5b7c614590363082f (diff)
Attaching comments to declarations: parse the comment in context of the
declaration it was attached to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162033 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/warn-documentation.cpp')
-rw-r--r--test/Sema/warn-documentation.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Sema/warn-documentation.cpp b/test/Sema/warn-documentation.cpp
index a361d57baa..d99520b673 100644
--- a/test/Sema/warn-documentation.cpp
+++ b/test/Sema/warn-documentation.cpp
@@ -641,6 +641,22 @@ void test_attach37<int>::test_attach38(int aaa, int bbb) {}
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.