summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-09-12 16:50:35 +0000
committerTed Kremenek <kremenek@apple.com>2012-09-12 16:50:35 +0000
commit191ffd35a0d6fd23572a8072436b5527370ca03b (patch)
tree5ad04e696cf8ae9a0dd671f12d7d38ecba1d700b /clang/lib/Parse/ParseObjc.cpp
parent632a6432f5ef8875486b9d857de30d7608b099bd (diff)
downloadbcm5719-llvm-191ffd35a0d6fd23572a8072436b5527370ca03b.tar.gz
bcm5719-llvm-191ffd35a0d6fd23572a8072436b5527370ca03b.zip
Revert "objective-C: warn under a flag if missing argument"
We plan on discussing this more, but we shouldn't have it in the compiler in an incomplete state. llvm-svn: 163720
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
-rw-r--r--clang/lib/Parse/ParseObjc.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp
index 6d5f35a7993..977d4d97347 100644
--- a/clang/lib/Parse/ParseObjc.cpp
+++ b/clang/lib/Parse/ParseObjc.cpp
@@ -1031,7 +1031,7 @@ Decl *Parser::ParseObjCMethodDecl(SourceLocation mLoc,
Scope::FunctionPrototypeScope|Scope::DeclScope);
AttributePool allParamAttrs(AttrFactory);
- bool warnSelectorName = false;
+
while (1) {
ParsedAttributes paramAttrs(AttrFactory);
Sema::ObjCArgInfo ArgInfo;
@@ -1100,16 +1100,8 @@ Decl *Parser::ParseObjCMethodDecl(SourceLocation mLoc,
// Check for another keyword selector.
SelIdent = ParseObjCSelectorPiece(selLoc);
- if (!SelIdent) {
- if (Tok.isNot(tok::colon))
- break;
- // parameter name was not followed with selector name; as in:
- // - (void) Meth: (id) Name:(id)Arg2; Issue a warning as user
- // might have meant: - (void) Meth: (id)Arg1 Name:(id)Arg2;
- Diag(Tok, diag::warn_missing_argument_name); // missing argument name.
- warnSelectorName = true;
- }
-
+ if (!SelIdent && Tok.isNot(tok::colon))
+ break;
// We have a selector or a colon, continue parsing.
}
@@ -1150,9 +1142,6 @@ Decl *Parser::ParseObjCMethodDecl(SourceLocation mLoc,
Selector Sel = PP.getSelectorTable().getSelector(KeyIdents.size(),
&KeyIdents[0]);
- if (warnSelectorName)
- Diag(mLoc, diag::note_missing_argument_name) << Sel.getAsString();
-
Decl *Result
= Actions.ActOnMethodDeclaration(getCurScope(), mLoc, Tok.getLocation(),
mType, DSRet, ReturnType,
OpenPOWER on IntegriCloud