diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-26 00:30:24 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-26 00:30:24 +0000 |
commit | 9214819c7d4b24fd1b38480d845d8e345d8f0196 (patch) | |
tree | 375bbc435253d641b1b016c56d51db8d0d63992a /lib/Sema/CodeCompleteConsumer.cpp | |
parent | 0ad8b4652aac01257c2b4d205b08c77ef4b16c35 (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/CodeCompleteConsumer.cpp')
-rw-r--r-- | lib/Sema/CodeCompleteConsumer.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Sema/CodeCompleteConsumer.cpp b/lib/Sema/CodeCompleteConsumer.cpp index c4e7bb4269..4345123558 100644 --- a/lib/Sema/CodeCompleteConsumer.cpp +++ b/lib/Sema/CodeCompleteConsumer.cpp @@ -443,8 +443,6 @@ PrintingCodeCompleteConsumer::ProcessCodeCompleteResults(Sema &SemaRef, CodeCompletionContext Context, CodeCompletionResult *Results, unsigned NumResults) { - std::stable_sort(Results, Results + NumResults); - // Print the results. for (unsigned I = 0; I != NumResults; ++I) { OS << "COMPLETION: "; @@ -662,11 +660,6 @@ bool clang::operator<(const CodeCompletionResult &X, if (cmp) return cmp < 0; - // If case-insensitive comparison fails, try case-sensitive comparison. - cmp = XStr.compare(YStr); - if (cmp) - return cmp < 0; - // Non-hidden names precede hidden names. if (X.Hidden != Y.Hidden) return !X.Hidden; @@ -702,7 +695,7 @@ CIndexCodeCompleteConsumer::ProcessOverloadCandidates(Sema &SemaRef, unsigned NumCandidates) { for (unsigned I = 0; I != NumCandidates; ++I) { WriteUnsigned(OS, CXCursor_NotImplemented); - WriteUnsigned(OS, /*Priority=*/I); + WriteUnsigned(OS, /*Priority=*/0); WriteUnsigned(OS, /*Availability=*/CXAvailability_Available); CodeCompletionString *CCS = Candidates[I].CreateSignatureString(CurrentArg, SemaRef); |