aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-26 00:30:24 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-26 00:30:24 +0000
commit9214819c7d4b24fd1b38480d845d8e345d8f0196 (patch)
tree375bbc435253d641b1b016c56d51db8d0d63992a /lib/Sema/SemaCodeComplete.cpp
parent0ad8b4652aac01257c2b4d205b08c77ef4b16c35 (diff)
Revert "Move the sorting of code-completion results out of the main path and
into the clients", because the C standard library sucks. Where's my stable sort, huh? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112121 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--lib/Sema/SemaCodeComplete.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index d61ddcdf75..fed6536570 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/lib/Sema/SemaCodeComplete.cpp
@@ -2277,6 +2277,8 @@ static void HandleCodeCompleteResults(Sema *S,
CodeCompletionContext Context,
CodeCompletionResult *Results,
unsigned NumResults) {
+ std::stable_sort(Results, Results + NumResults);
+
if (CodeCompleter)
CodeCompleter->ProcessCodeCompleteResults(*S, Context, Results, NumResults);