summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/warn-documentation.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-08-24 00:05:30 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-08-24 00:05:30 +0000
commit907f6b8c06f0bfdb345dd2ee480a50d1e489c7d8 (patch)
tree52d02678ec5581cc40f942b1a47eec5a1afb6bdd /clang/test/Sema/warn-documentation.cpp
parentdd28e7930ccae5dd67f62d6a4221a3112dd93ec8 (diff)
downloadbcm5719-llvm-907f6b8c06f0bfdb345dd2ee480a50d1e489c7d8.tar.gz
bcm5719-llvm-907f6b8c06f0bfdb345dd2ee480a50d1e489c7d8.zip
Comment semantic analysis: treat function typedefs as functions so that one can
use \param and \returns in documentation. Fixes PR13533. llvm-svn: 162507
Diffstat (limited to 'clang/test/Sema/warn-documentation.cpp')
-rw-r--r--clang/test/Sema/warn-documentation.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/test/Sema/warn-documentation.cpp b/clang/test/Sema/warn-documentation.cpp
index 1cd13585212..43143ff83d0 100644
--- a/clang/test/Sema/warn-documentation.cpp
+++ b/clang/test/Sema/warn-documentation.cpp
@@ -250,6 +250,29 @@ int test_param17(int a);
/// \param x2 Ccc.
int test_param18(int x1, int x2, int x3);
+// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'aaa'?}}
+/// \param aaa Meow.
+/// \param bbb Bbb.
+/// \returns aaa.
+typedef int test_param19(int aaa);
+
+// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'aaa'?}}
+/// \param aaa Meow.
+/// \param bbb Bbb.
+/// \returns aaa.
+typedef int (*test_param20)(int aaa);
+
+// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'aaa'?}}
+/// \param aaa Meow.
+/// \param bbb Bbb.
+/// \returns aaa.
+typedef int (* const test_param21)(int aaa);
+
+// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'aaa'?}}
+/// \param aaa Meow.
+/// \param bbb Bbb.
+/// \returns aaa.
+typedef int (C::*test_param22)(int aaa);
// expected-warning@+1 {{'\tparam' command used in a comment that is not attached to a template declaration}}
/// \tparam T Aaa
OpenPOWER on IntegriCloud