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 | 56242baaae6c45b24fbdd5bc56fe4ee516fa9e6b (patch) | |
tree | 4e68e2f729b1ec334adccce24200727018f6d95b /lib/Parse/ParseObjc.cpp | |
parent | e48601573b9631600f563957476edb3b9cd41387 (diff) |
objective-c: deprecated C-like parameters in Objective-C
method declarations.
// rdar://11578353.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158929 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index d3016c7c15..b96a8dde9f 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/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... |