summaryrefslogtreecommitdiffstats
path: root/clang/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
commit714693059116794ba293787437b293327b38a95d (patch)
tree0987c8356b8c265024dc4bae9c689e042a091d0f /clang/test/Sema/warn-documentation.cpp
parent8334af8c2a88e59860e7aef2ec44a64df402cae1 (diff)
downloadbcm5719-llvm-714693059116794ba293787437b293327b38a95d.tar.gz
bcm5719-llvm-714693059116794ba293787437b293327b38a95d.zip
Comment parsing: actually check for a block command after "\param x"
This fixes PR15068. llvm-svn: 173539
Diffstat (limited to 'clang/test/Sema/warn-documentation.cpp')
-rw-r--r--clang/test/Sema/warn-documentation.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/clang/test/Sema/warn-documentation.cpp b/clang/test/Sema/warn-documentation.cpp
index 5678fd94cb7..6a6b8dd599c 100644
--- a/clang/test/Sema/warn-documentation.cpp
+++ b/clang/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);
+
OpenPOWER on IntegriCloud