diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:13:35 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:13:35 +0000 |
commit | 6694ed095d6b27a2c92ec4fd63664fcd88a05749 (patch) | |
tree | 0633c29bd8350e306f3a24a30f3f6045efd35420 /lib/Sema/SemaCodeComplete.cpp | |
parent | d5dc75c5cf109efe52b1da32ec44a667389a0f0a (diff) |
Notes
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | lib/Sema/SemaCodeComplete.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index 3eef366b75b33..94cfc4baca514 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -3720,9 +3720,17 @@ static void AddObjCProperties( Builder.AddPlaceholderChunk( Builder.getAllocator().CopyString(PlaceholderStr)); + // When completing blocks properties that return void the default + // property completion result should show up before the setter, + // otherwise the setter completion should show up before the default + // property completion, as we normally want to use the result of the + // call. Results.MaybeAddResult( Result(Builder.TakeString(), P, - Results.getBasePriority(P) + CCD_BlockPropertySetter), + Results.getBasePriority(P) + + (BlockLoc.getTypePtr()->getReturnType()->isVoidType() + ? CCD_BlockPropertySetter + : -CCD_BlockPropertySetter)), CurContext); } }; |