diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-09-12 16:50:30 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-09-12 16:50:30 +0000 |
commit | e62b1295ec71d4f0ca05b973e88d4b4e858eb96e (patch) | |
tree | 35225c1f49e495f4f54871e68d18c0d40d1e095e /lib/Parse/ParseObjc.cpp | |
parent | 0098d23677f498e650c5ecc5ee7425d81bf6117b (diff) | |
download | clang-e62b1295ec71d4f0ca05b973e88d4b4e858eb96e.tar.gz clang-e62b1295ec71d4f0ca05b973e88d4b4e858eb96e.tar.bz2 clang-e62b1295ec71d4f0ca05b973e88d4b4e858eb96e.tar.xz |
Revert "objective-C: warn if selector has nothing but bare"
We plan on discussing this more.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163719 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index 2bcb7a786a..6d5f35a799 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -1032,7 +1032,6 @@ Decl *Parser::ParseObjCMethodDecl(SourceLocation mLoc, AttributePool allParamAttrs(AttrFactory); bool warnSelectorName = false; - bool warnHasNoName = true; while (1) { ParsedAttributes paramAttrs(AttrFactory); Sema::ObjCArgInfo ArgInfo; @@ -1110,8 +1109,7 @@ Decl *Parser::ParseObjCMethodDecl(SourceLocation mLoc, Diag(Tok, diag::warn_missing_argument_name); // missing argument name. warnSelectorName = true; } - else - warnHasNoName = false; + // We have a selector or a colon, continue parsing. } @@ -1152,11 +1150,8 @@ Decl *Parser::ParseObjCMethodDecl(SourceLocation mLoc, Selector Sel = PP.getSelectorTable().getSelector(KeyIdents.size(), &KeyIdents[0]); - if (warnSelectorName) { - if (warnHasNoName) - Diag(mLoc, diag::warn_selector_with_bare_colon); + if (warnSelectorName) Diag(mLoc, diag::note_missing_argument_name) << Sel.getAsString(); - } Decl *Result = Actions.ActOnMethodDeclaration(getCurScope(), mLoc, Tok.getLocation(), |