This is an archive of the discontinued LLVM Phabricator instance.

[indexer] Relate properties to their backing ivars and mark implicit getters and setters with the Implicit role
ClosedPublic

Authored by nathawes on Feb 15 2017, 3:28 PM.

Details

Reviewers
akyrtzi
Summary

Also output property + getter/setter definition occurrences for both explicit and implicit @synthesize nodes.

Diff Detail

Repository
rL LLVM

Event Timeline

nathawes created this revision.Feb 15 2017, 3:28 PM
akyrtzi added inline comments.Feb 16 2017, 8:44 AM
lib/Index/IndexDecl.cpp
290

You can use D->property_impls() to simplify the code here.

test/Index/Core/index-source.m
238

For this case there is no property definition emitted, so the fooproperty doesn't get associated with the ivar as accessor. We should a emit an implicit property definition, with location pointing at @implementation, and relate it to the ivar.

nathawes updated this revision to Diff 88759.Feb 16 2017, 11:32 AM

Also report an implicit property definition (with relation to the ivar), getter and setter when the @synthesize is implicit.

akyrtzi added inline comments.Feb 16 2017, 2:42 PM
lib/Index/IndexDecl.cpp
286

I should be ObjCPropertyImplDecl and you don't need the cast, right ?

nathawes updated this revision to Diff 88791.Feb 16 2017, 2:58 PM
nathawes retitled this revision from [indexer] Relate properties to their backing ivars and mark implicit getters and setters with the Implicit role to [indexer] Relate properties to their backing ivars and mark implicit getters and setters with the Implicit role .
nathawes edited the summary of this revision. (Show Details)

Remove pointless cast.

akyrtzi accepted this revision.Feb 16 2017, 9:04 PM

Committed in r295416, thanks!

This revision is now accepted and ready to land.Feb 16 2017, 9:04 PM
akyrtzi closed this revision.Feb 16 2017, 9:05 PM