[cfe-commits] r142459 - in /cfe/trunk: lib/Parse/ParseDecl.cpp test/SemaObjC/iboutletcollection-attr.m
Fariborz Jahanian
fjahanian at apple.com
Tue Oct 18 16:13:50 PDT 2011
Author: fjahanian
Date: Tue Oct 18 18:13:50 2011
New Revision: 142459
URL: http://llvm.org/viewvc/llvm-project?rev=142459&view=rev
Log:
objc: allow class name qualified with protocols in
iboutletcollection attribute. But ignore protocol
list. // rdar://10296078
Modified:
cfe/trunk/lib/Parse/ParseDecl.cpp
cfe/trunk/test/SemaObjC/iboutletcollection-attr.m
Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=142459&r1=142458&r2=142459&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Tue Oct 18 18:13:50 2011
@@ -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 ')'
}
}
Modified: cfe/trunk/test/SemaObjC/iboutletcollection-attr.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/iboutletcollection-attr.m?rev=142459&r1=142458&r2=142459&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/iboutletcollection-attr.m (original)
+++ cfe/trunk/test/SemaObjC/iboutletcollection-attr.m Tue Oct 18 18:13:50 2011
@@ -39,5 +39,5 @@
@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
More information about the cfe-commits
mailing list