diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2012-06-21 18:43:08 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-06-21 18:43:08 +0000 |
| commit | 45337f53df6552693f6a2f94fa5b1f30e30747b3 (patch) | |
| tree | d07f687382f2ce3c8b65d1b285f82c018d6d38dc /clang/lib | |
| parent | f06b731fed378eee6ec18aa1e21c1e73602d687d (diff) | |
| download | bcm5719-llvm-45337f53df6552693f6a2f94fa5b1f30e30747b3.tar.gz bcm5719-llvm-45337f53df6552693f6a2f94fa5b1f30e30747b3.zip | |
objective-c: deprecated C-like parameters in Objective-C
method declarations.
// rdar://11578353.
llvm-svn: 158929
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Parse/ParseObjc.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index d3016c7c154..b96a8dde9f2 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/lib/Parse/ParseObjc.cpp @@ -1106,7 +1106,7 @@ Decl *Parser::ParseObjCMethodDecl(SourceLocation mLoc, } bool isVariadic = false; - + bool cStyleParamWarned = false; // Parse the (optional) parameter list. while (Tok.is(tok::comma)) { ConsumeToken(); @@ -1115,6 +1115,10 @@ Decl *Parser::ParseObjCMethodDecl(SourceLocation mLoc, ConsumeToken(); break; } + if (!cStyleParamWarned) { + Diag(Tok, diag::warn_cstyle_param); + cStyleParamWarned = true; + } DeclSpec DS(AttrFactory); ParseDeclarationSpecifiers(DS); // Parse the declarator. @@ -1126,7 +1130,6 @@ Decl *Parser::ParseObjCMethodDecl(SourceLocation mLoc, ParmDecl.getIdentifierLoc(), Param, 0)); - } // FIXME: Add support for optional parameter list... |

