[cfe-commits] r100582 - in /cfe/trunk: lib/Sema/SemaObjCProperty.cpp test/SemaObjC/synthesized-ivar.m
Fariborz Jahanian
fjahanian at apple.com
Tue Apr 6 16:36:17 PDT 2010
Author: fjahanian
Date: Tue Apr 6 18:36:17 2010
New Revision: 100582
URL: http://llvm.org/viewvc/llvm-project?rev=100582&view=rev
Log:
default access for synthesize ivar is @protect.
Fixes radar 7823675.
Modified:
cfe/trunk/lib/Sema/SemaObjCProperty.cpp
cfe/trunk/test/SemaObjC/synthesized-ivar.m
Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=100582&r1=100581&r2=100582&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)
+++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Tue Apr 6 18:36:17 2010
@@ -356,7 +356,7 @@
if (!Ivar) {
Ivar = ObjCIvarDecl::Create(Context, ClassImpDecl, PropertyLoc,
PropertyIvar, PropType, /*Dinfo=*/0,
- ObjCIvarDecl::Public,
+ ObjCIvarDecl::Protected,
(Expr *)0);
ClassImpDecl->addDecl(Ivar);
IDecl->makeDeclVisibleInContext(Ivar, false);
Modified: cfe/trunk/test/SemaObjC/synthesized-ivar.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/synthesized-ivar.m?rev=100582&r1=100581&r2=100582&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/synthesized-ivar.m (original)
+++ cfe/trunk/test/SemaObjC/synthesized-ivar.m Tue Apr 6 18:36:17 2010
@@ -11,3 +11,6 @@
return IP;
}
@end
+
+// rdar: // 7823675
+int f0(I *a) { return a->IP; } // expected-error {{instance variable 'IP' is protected}}
More information about the cfe-commits
mailing list