This is an archive of the discontinued LLVM Phabricator instance.

[CodeCompletion] Ensure that ObjC root class completes instance methods from protocols and categories as well
ClosedPublic

Authored by arphaman on Nov 30 2016, 6:57 AM.

Details

Summary

Code completion results for class methods already include instance methods from Objective-C root classes. This patch ensures that the results also include instance methods from protocols that the root class implements and root class categories as well.

Diff Detail

Repository
rL LLVM

Event Timeline

arphaman updated this revision to Diff 79733.Nov 30 2016, 6:57 AM
arphaman retitled this revision from to [CodeCompletion] Ensure that ObjC root class completes instance methods from protocols and categories as well.
arphaman updated this object.
arphaman added reviewers: bruno, akyrtzi.
arphaman set the repository for this revision to rL LLVM.
arphaman added a subscriber: cfe-commits.
bruno edited edge metadata.Jan 20 2017, 4:07 PM

How does this interact (if at all) with classes annotated with __attribute__((objc_root_class))?

lib/Sema/SemaCodeComplete.cpp
5259 ↗(On Diff #79733)

false -> false /*IsRootClass*/

arphaman marked an inline comment as done.Jan 23 2017, 8:17 AM

How does this interact (if at all) with classes annotated with __attribute__((objc_root_class))?

The root classes are just classes without a superclass, the attribute __attribute__((objc_root_class)) is used by foundation root classes to avoid the warning for a missing superclass. But there's no real crossover here.

arphaman updated this revision to Diff 85400.Jan 23 2017, 8:17 AM

Add comment to parameter

bruno accepted this revision.Jan 23 2017, 11:05 AM

Ok. Thanks Alex, LGTM

This revision is now accepted and ready to land.Jan 23 2017, 11:05 AM
This revision was automatically updated to reflect the committed changes.