diff options
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... |

