Commit Graph

3 Commits

Author SHA1 Message Date
Alex Lorenz 6e0f393e12 [CodeCompletion] Block property setters: Use dynamic priority heuristic
Now when completing blocks properties that return void the block call completion
result shows up before the setter, otherwise the setter completion shows up
before the block call completion. We normally want to use the result of the
block call, so one typically wouldn't call a block that returns a non-void type
in a standalone statement.

rdar://28846153

Differential Revision: https://reviews.llvm.org/D26034

llvm-svn: 291232
2017-01-06 12:00:44 +00:00
Alex Lorenz baef802f36 [CodeCompletion] Show block invocation results for block property setters
This commit changes the code completion results for block property setters:
The default block property result is now a block invocation rather than a simple
property reference.

rdar://28846196

Differential Revision: https://reviews.llvm.org/D26071

llvm-svn: 286363
2016-11-09 13:43:18 +00:00
Alex Lorenz f0b4e5db16 [CodeCompletion] Add a block property setter completion result
This commit changes code completion results for Objective-C block properties:
clang now suggests an additional completion result that displays the block
property together with '=' and the block literal placeholder for the appropriate
readwrite block properties.

This commit uses a simple heuristic to determine when it's appropriate to
suggest a setter completion for block properties: the additional block setter
completion is provided iff the member access that's being completed is a
standalone statement.

rdar://28481726

Differential Revision: https://reviews.llvm.org/D25520

llvm-svn: 284472
2016-10-18 10:55:01 +00:00