diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:24:06 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:24:06 +0000 | 
| commit | 95ec533a1d8c450f6c6c5e84fe85423960e13382 (patch) | |
| tree | bfe77b0dccd50ed2f4b4e6299d4bc4eaafced6e7 /contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp | |
| parent | 2b532af82919b9141e7fd04becf354a0a7dfa813 (diff) | |
| parent | 7e7b6700743285c0af506ac6299ddf82ebd434b9 (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp')
| -rw-r--r-- | contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp | 10 | 
1 files changed, 9 insertions, 1 deletions
| diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp index 3eef366b75b3..94cfc4baca51 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp +++ b/contrib/llvm/tools/clang/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);      }    }; | 
