diff options
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 12 | ||||
-rw-r--r-- | test/SemaObjC/iboutletcollection-attr.m | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 0c60e28741..8cf25b619d 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -248,7 +248,17 @@ void Parser::ParseGNUAttributeArgs(IdentifierInfo *AttrName, else if (Tok.is(tok::less) && AttrName->isStr("iboutletcollection")) { if (!ExpectAndConsume(tok::less, diag::err_expected_less_after, "<", tok::greater)) { - Diag(Tok, diag::err_iboutletcollection_with_protocol); + while (Tok.is(tok::identifier)) { + ConsumeToken(); + if (Tok.is(tok::greater)) + break; + if (Tok.is(tok::comma)) { + ConsumeToken(); + continue; + } + } + if (Tok.isNot(tok::greater)) + Diag(Tok, diag::err_iboutletcollection_with_protocol); SkipUntil(tok::r_paren, false, true); // skip until ')' } } diff --git a/test/SemaObjC/iboutletcollection-attr.m b/test/SemaObjC/iboutletcollection-attr.m index 1491b3292d..7caebb059e 100644 --- a/test/SemaObjC/iboutletcollection-attr.m +++ b/test/SemaObjC/iboutletcollection-attr.m @@ -39,5 +39,5 @@ typedef void *PV; @interface RDar10296078 : ParentRDar10296078 @property (nonatomic, strong) - __attribute__((iboutletcollection(RDar10296078_OtherClass<RDar10296078_Protocol>))) NSArray *stuff; // expected-error {{invalid argument of iboutletcollection attribute}} + __attribute__((iboutletcollection(RDar10296078_OtherClass<RDar10296078_Protocol>))) NSArray *stuff; @end |