sramij
sramij

Reputation: 4925

How to suppress "Auto property synthesis will not synthesize property 'xxxx' declared in protocol 'yyy "?

For debugging purposes, I am creating a class B which conforms to a certain protocol A.

@interface B: NSObject<A>
@end

Objective of this type hold internally another object _internalObj which also confirms to protocol A. I also override some of the methods and re-route the others using:

- (void)forwardInvocation:(NSInvocation *)anInvocation
{
    if ([_internalObj respondsToSelector:
         [anInvocation selector]])
        [anInvocation invokeWithTarget:_internalObj];
    else
        [super forwardInvocation:anInvocation];
}

How, I am getting the following errors/warnings (depends on my project settings) which I am not successful suppressing.

"Auto property synthesis will not synthesize property 'xxxx' declared in protocol 'yyy "

I already tried the following but it didn't help:

#pragma clang diagnostic ignored "-Wobjc-property-synthesis"
#pragma clang diagnostic ignored "-Wobjc-missing-property-synthesis"

Any ideas?

Upvotes: 1

Views: 948

Answers (1)

sramij
sramij

Reputation: 4925

Just found -Wobjc-protocol-property-synthesis on http://fuckingclangwarnings.com and it's working.

Upvotes: 2

Related Questions