diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-08-24 00:05:30 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-08-24 00:05:30 +0000 |
commit | 70ff1091315c60fed68d7197c637ec8c588e67a1 (patch) | |
tree | 11360fbec3df11791d317d252785e4cda73e9dd5 /test/Sema/warn-documentation.cpp | |
parent | 1ddbd89bb397988dd1a4e96d8d8c2c7705a2af75 (diff) |
Comment semantic analysis: treat function typedefs as functions so that one can
use \param and \returns in documentation.
Fixes PR13533.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162507 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/warn-documentation.cpp')
-rw-r--r-- | test/Sema/warn-documentation.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Sema/warn-documentation.cpp b/test/Sema/warn-documentation.cpp index 1cd1358521..43143ff83d 100644 --- a/test/Sema/warn-documentation.cpp +++ b/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 |