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
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 2bcb7a7..6d5f35a 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -1032,7 +1032,6 @@
AttributePool allParamAttrs(AttrFactory);
bool warnSelectorName = false;
- bool warnHasNoName = true;
while (1) {
ParsedAttributes paramAttrs(AttrFactory);
Sema::ObjCArgInfo ArgInfo;
@@ -1110,8 +1109,7 @@
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 @@
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(),