SourceLocation selLoc;
IdentifierInfo *SelIdent = ParseObjCSelector(selLoc);
- if (!SelIdent) { // missing selector name.
+ // An unnamed colon is valid.
+ if (!SelIdent && Tok.isNot(tok::colon)) { // missing selector name.
Diag(Tok, diag::err_expected_selector_for_method)
<< SourceRange(mLoc, Tok.getLocation());
// Skip until we get a ; or {}.
// RUN: clang -verify %s
+@interface Lancelot @end
+@implementation Lancelot
+
+- (void):(int)x {}
+- (void)xx:(int)x :(int)y { }
+
+@end
+
int main() {
SEL s = @selector(retain);
SEL s1 = @selector(meth1:);