]> granicus.if.org Git - clang/commit
[CodeCompletion] Add a block property setter completion result
authorAlex Lorenz <arphaman@gmail.com>
Tue, 18 Oct 2016 10:55:01 +0000 (10:55 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Tue, 18 Oct 2016 10:55:01 +0000 (10:55 +0000)
commit79d6d6ad6c2e274fd1933f83f61bd83388922ea3
treeb2548a2fbea707a5ebebd3f3407a44223482ca4a
parentf051915ca117aebec67f145c86f86b10b5e89c33
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284472 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Parse/Parser.h
include/clang/Sema/CodeCompleteConsumer.h
include/clang/Sema/Sema.h
lib/Parse/ParseExpr.cpp
lib/Parse/ParseStmt.cpp
lib/Sema/SemaCodeComplete.cpp
test/Index/complete-block-property-assignment.m [new file with mode: 0644]