[cfe-commits] r171777 - in /cfe/trunk: lib/AST/DeclObjC.cpp lib/Sema/SemaDeclObjC.cpp test/SemaObjC/forward-protocol-incomplete-impl-warn.m
jahanian
fjahanian at apple.com
Mon Jan 7 13:31:46 PST 2013
On Jan 7, 2013, at 11:38 AM, Douglas Gregor <dgregor at apple.com> wrote:
>> void ObjCProtocolDecl::collectPropertiesToImplement(PropertyMap &PM) const {
>> - for (ObjCProtocolDecl::prop_iterator P = prop_begin(),
>> - E = prop_end(); P != E; ++P) {
>> + const ObjCProtocolDecl *PDecl = this;
>> + if (!isThisDeclarationADefinition() && getDefinition())
>> + PDecl = getDefinition();
>
> How about simply
>
> if (const ObjCProtocolDecl *PDecl = getDefinition()) {
> // loop over properties in PDecl
> }
>
> ?
In r171792.
- Fariborz
>
> - Doug
>
More information about the cfe-commits
mailing list