[LLVMbugs] [Bug 7495] LLVM/Clang does not allow ivar access for synthesised ivars without @synthesized

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 28 10:55:52 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7495

Fariborz Jahanian <fjahanian at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME

--- Comment #3 from Fariborz Jahanian <fjahanian at apple.com> 2010-06-28 12:55:52 CDT ---
(In reply to comment #2)
> (In reply to comment #1)
> > This is expected behavior. Default-synthesis happens at the end of class's
> > implementation; since
> > till then it is not known which class's properties need be default-synthesized.
> > This is similar to
> > declaring @synthesize after methods which reference property's ivar. To get
> > around this, put
> >  @synthesize for the property before where its ivar is ref'ed.
> 
> After discussing this among ourselves. To make this feature useful, we are
> going to support default-synthesizing property lazily and not only eagerly at
> the end only. I plan on doing this.

Some additional info.

Currently you can do at most two of these three:
1. omit @synthesize
2. omit the property ivar's declaration
3. use the property ivar directly

Even though feature as originally thought of and implemented behaves as
expected, we need to do 
all three above to make feature easier to use.
Also I might add that if user uses property-dot syntax in (3), then you won't
have any problem with -fobjc-nonfragile-abi2 in  its current form. This is how
initially ivars were intended to be used with
this feature. So, this PR in all practical purposes is resolved. We will
enhance this feature and post
it later on.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list