[LLVMbugs] [Bug 8770] Can't access property in Objective-C++

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Dec 14 08:20:04 PST 2010


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

Fariborz Jahanian <fjahanian at apple.com> changed:

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

--- Comment #4 from Fariborz Jahanian <fjahanian at apple.com> 2010-12-14 10:20:04 CST ---
(In reply to comment #3)
> Created an attachment (id=5894)
 --> (http://llvm.org/bugs/attachment.cgi?id=5894) [details]
> This exhibits the issue

One side-note:
When submitting test case, make it stand-alone. Please do not include header
files which may not
be available to every one or pre-processed version of such files which may be
under license.

I think here is the test case exhibiting the issue. In the test case, property
reference is not an l-value.
Something the older versions of clang (as well as gcc) were not considering.
Older versions of
clang (but not gcc) would issue the error when message expression version is
used (statement 2).

struct S {
    int x;
};

@interface I
@property struct S rec;
@end

void FUNC(I* foo) {
  foo.rec.x = 10;       // 1
  [foo rec].x = 10;    //  2
}

-- 
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