[cfe-commits] r147982 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/SemaObjC/ContClassPropertyLookup.m
Chad Rosier
mcrosier at apple.com
Mon Jan 16 11:46:54 PST 2012
I believe the commit message has the incorrect radar, while the test case has the correct one.
rdar://10666594
Chad
On Jan 11, 2012, at 4:18 PM, Fariborz Jahanian wrote:
> Author: fjahanian
> Date: Wed Jan 11 18:18:35 2012
> New Revision: 147982
>
> URL: http://llvm.org/viewvc/llvm-project?rev=147982&view=rev
> Log:
> objective-c: fixes a regression in looking up names
> in class extensions and categories by recent refactoring
> of objc class ASTs. // rdar://1066654
>
> Modified:
> cfe/trunk/lib/Sema/SemaDecl.cpp
> cfe/trunk/test/SemaObjC/ContClassPropertyLookup.m
>
> Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=147982&r1=147981&r2=147982&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaDecl.cpp Wed Jan 11 18:18:35 2012
> @@ -1255,8 +1255,11 @@
> Id = IDecl->getIdentifier();
> }
> }
> -
> - return dyn_cast_or_null<ObjCInterfaceDecl>(IDecl);
> + ObjCInterfaceDecl *Def = dyn_cast_or_null<ObjCInterfaceDecl>(IDecl);
> + // This routine must always return a class definition, if any.
> + if (Def && Def->getDefinition())
> + Def = Def->getDefinition();
> + return Def;
> }
>
> /// getNonFieldDeclScope - Retrieves the innermost scope, starting
>
> Modified: cfe/trunk/test/SemaObjC/ContClassPropertyLookup.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/ContClassPropertyLookup.m?rev=147982&r1=147981&r2=147982&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjC/ContClassPropertyLookup.m (original)
> +++ cfe/trunk/test/SemaObjC/ContClassPropertyLookup.m Wed Jan 11 18:18:35 2012
> @@ -16,3 +16,23 @@
> @implementation MyObject
> @synthesize foo = _foo;
> @end
> +
> +// rdar://10666594
> + at interface MPMediaItem
> + at end
> +
> + at class MPMediaItem;
> +
> + at interface MPMediaItem ()
> + at property (nonatomic, readonly) id title;
> + at end
> +
> + at interface PodcastEpisodesViewController
> + at end
> +
> + at implementation PodcastEpisodesViewController
> +- (id) Meth {
> + MPMediaItem *episode;
> + return episode.title;
> +}
> + at end
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list