aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/warn-documentation.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-01-26 00:36:14 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-01-26 00:36:14 +0000
commit10442564e1ba3c4dfb184cc4e36beffbee4811c3 (patch)
tree5a13ac819203b9b9c645f3abe1b02565e3e85b44 /test/Sema/warn-documentation.cpp
parent01a41140cd8ec9475ed0c33384310fbdd3b6de11 (diff)
Comment parsing: actually check for a block command after "\param x"
This fixes PR15068. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/warn-documentation.cpp')
-rw-r--r--test/Sema/warn-documentation.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/Sema/warn-documentation.cpp b/test/Sema/warn-documentation.cpp
index 5678fd94cb..6a6b8dd599 100644
--- a/test/Sema/warn-documentation.cpp
+++ b/test/Sema/warn-documentation.cpp
@@ -836,3 +836,31 @@ typedef const struct test_nocrash7 * test_nocrash8;
/// aaa \unknown aaa \unknown aaa
int test_nocrash9;
+
+// We used to crash on this. PR15068
+
+// expected-warning@+2 {{empty paragraph passed to '\param' command}}
+// expected-warning@+2 {{empty paragraph passed to '\param' command}}
+///@param x
+///@param y
+int test_nocrash10(int x, int y);
+
+// expected-warning@+2 {{empty paragraph passed to '\param' command}} expected-warning@+2 {{parameter 'x' not found in the function declaration}}
+// expected-warning@+2 {{empty paragraph passed to '\param' command}} expected-warning@+2 {{parameter 'y' not found in the function declaration}}
+///@param x
+///@param y
+int test_nocrash11();
+
+// expected-warning@+3 {{empty paragraph passed to '\param' command}} expected-warning@+3 {{parameter 'x' not found in the function declaration}}
+// expected-warning@+3 {{empty paragraph passed to '\param' command}} expected-warning@+3 {{parameter 'y' not found in the function declaration}}
+/**
+@param x
+@param y
+**/
+int test_nocrash12();
+
+// expected-warning@+2 {{empty paragraph passed to '\param' command}}
+// expected-warning@+1 {{empty paragraph passed to '\param' command}}
+///@param x@param y
+int test_nocrash13(int x, int y);
+