[LLVMbugs] [Bug 16693] New: Bogus warning about auto property synthesis

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 24 11:18:30 PDT 2013


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

            Bug ID: 16693
           Summary: Bogus warning about auto property synthesis
           Product: clang
           Version: 3.3
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: paul.q.stevenson at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This simple fragment triggers the "auto property synthesis will not synthesize
property 'prop' because it is 'readwrite' but it will be synthesized 'readonly'
via another property [-Wobjc-property-synthesis]"

#import <Foundation/Foundation.h>

@interface Parent : NSObject
@property (readonly) int prop;
@end

@interface Child : Parent
@property (readwrite) int prop;
@end

@implementation Child
@synthesize prop;
@end

But the generated code *does* synthesize Child.prop correctly (a getter and a
setter). So what is the warning trying to convey in this case?

Also, it's not clear whether 'auto property synthesis' is intended to refer to
implicit synthesis (i.e. without the need for a @synthesize statement) or the
fact that the getter/setter are compiled automatically when you specify
@synthesize. It feels like it should be referring to the former, but in that
case the warning is even more bogus since there *is* an explicit @synthesize
and we're not relying on auto (implicit) synthesis.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130724/01e5e8ee/attachment.html>


More information about the llvm-bugs mailing list