diff options
| author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-06-24 04:41:32 +0000 |
|---|---|---|
| committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-06-24 04:41:32 +0000 |
| commit | 02489eb4068f80d5311eb97c2309a34a1348aa77 (patch) | |
| tree | 67c16b17817f7f54f73cae1bdd96e123d0858fc3 /clang/test/Sema | |
| parent | d851ea068c9893e077f9def04e5303f5995590b4 (diff) | |
| download | bcm5719-llvm-02489eb4068f80d5311eb97c2309a34a1348aa77.tar.gz bcm5719-llvm-02489eb4068f80d5311eb97c2309a34a1348aa77.zip | |
Comment parsing: allow "\param ..." to describe variadic arguments
Original patch by Fariborz Jahanian; extended by me.
Fixes rdar://14124644
llvm-svn: 184688
Diffstat (limited to 'clang/test/Sema')
| -rw-r--r-- | clang/test/Sema/warn-documentation.cpp | 16 | ||||
| -rw-r--r-- | clang/test/Sema/warn-documentation.m | 14 |
2 files changed, 30 insertions, 0 deletions
diff --git a/clang/test/Sema/warn-documentation.cpp b/clang/test/Sema/warn-documentation.cpp index 21b8dcb0d24..7166a499094 100644 --- a/clang/test/Sema/warn-documentation.cpp +++ b/clang/test/Sema/warn-documentation.cpp @@ -305,6 +305,22 @@ typedef test_param27 test_param28; typedef unsigned int test_param29; +/// \param aaa Aaa +/// \param ... Vararg +int test_vararg_param1(int aaa, ...); + +/// \param ... Vararg +int test_vararg_param2(...); + +// expected-warning@+1 {{parameter '...' not found in the function declaration}} expected-note@+1 {{did you mean 'aaa'?}} +/// \param ... Vararg +int test_vararg_param3(int aaa); + +// expected-warning@+1 {{parameter '...' not found in the function declaration}} +/// \param ... Vararg +int test_vararg_param4(); + + // expected-warning@+1 {{'\tparam' command used in a comment that is not attached to a template declaration}} /// \tparam T Aaa int test_tparam1; diff --git a/clang/test/Sema/warn-documentation.m b/clang/test/Sema/warn-documentation.m index 17dd92e6eba..5e95e2a1e8a 100644 --- a/clang/test/Sema/warn-documentation.m +++ b/clang/test/Sema/warn-documentation.m @@ -215,3 +215,17 @@ int FooBar(); /// \brief comment -(void)meth {} @end + +// rdar://14124644 +@interface test_vararg1 +/// @param[in] arg somthing +/// @param[in] ... This is vararg +- (void) VarArgMeth : (id)arg, ...; +@end + +@implementation test_vararg1 +/// @param[in] arg somthing +/// @param[in] ... This is vararg +- (void) VarArgMeth : (id)arg, ... {} +@end + |

