objc: allow class name qualified with protocols in
iboutletcollection attribute. But ignore protocol
list. // rdar://10296078
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142459 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 0c60e28..8cf25b6 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -248,7 +248,17 @@
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 ')'
}
}