[cfe-commits] r142409 - in /cfe/trunk: lib/Sema/SemaDeclAttr.cpp test/SemaObjC/iboutletcollection-attr.m
Fariborz Jahanian
fjahanian at apple.com
Tue Oct 18 12:54:31 PDT 2011
Author: fjahanian
Date: Tue Oct 18 14:54:31 2011
New Revision: 142409
URL: http://llvm.org/viewvc/llvm-project?rev=142409&view=rev
Log:
objc: more changes in use of IBOutletCollection attribute.
'Class' is disallowed as argument. If the argument is missing,
NSObject is assumed. // rdar://10296078
Modified:
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
cfe/trunk/test/SemaObjC/iboutletcollection-attr.m
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=142409&r1=142408&r2=142409&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Tue Oct 18 14:54:31 2011
@@ -805,7 +805,7 @@
IdentifierInfo *II = Attr.getParameterName();
if (!II)
- II = &S.Context.Idents.get("id");
+ II = &S.Context.Idents.get("NSObject");
ParsedType TypeRep = S.getTypeName(*II, Attr.getLoc(),
S.getScopeForContext(D->getDeclContext()->getParent()));
@@ -818,8 +818,7 @@
// FIXME. Gnu attribute extension ignores use of builtin types in
// attributes. So, __attribute__((iboutletcollection(char))) will be
// treated as __attribute__((iboutletcollection())).
- if (!QT->isObjCIdType() && !QT->isObjCClassType() &&
- !QT->isObjCObjectType()) {
+ if (!QT->isObjCIdType() && !QT->isObjCObjectType()) {
S.Diag(Attr.getLoc(), diag::err_iboutletcollection_type) << II;
return;
}
Modified: cfe/trunk/test/SemaObjC/iboutletcollection-attr.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/iboutletcollection-attr.m?rev=142409&r1=142408&r2=142409&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/iboutletcollection-attr.m (original)
+++ cfe/trunk/test/SemaObjC/iboutletcollection-attr.m Tue Oct 18 14:54:31 2011
@@ -2,6 +2,8 @@
// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify %s
// rdar://8308053
+ at class NSObject;
+
@interface I {
__attribute__((iboutletcollection(I))) id ivar1;
__attribute__((iboutletcollection(id))) id ivar2;
More information about the cfe-commits
mailing list