summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/CodeCompleteConsumer.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
commit109986512462cdf99b555d87b3119ea009979b59 (patch)
tree44d9fdab818dfa690f06b57417b815979262fe9a /clang/lib/Sema/CodeCompleteConsumer.cpp
parent8f292e7a6d0c28d6d6e918619eb27b346a7b7e49 (diff)
downloadbcm5719-llvm-109986512462cdf99b555d87b3119ea009979b59.tar.gz
bcm5719-llvm-109986512462cdf99b555d87b3119ea009979b59.zip
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? llvm-svn: 112121
Diffstat (limited to 'clang/lib/Sema/CodeCompleteConsumer.cpp')
-rw-r--r--clang/lib/Sema/CodeCompleteConsumer.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/clang/lib/Sema/CodeCompleteConsumer.cpp b/clang/lib/Sema/CodeCompleteConsumer.cpp
index c4e7bb4269d..43451235589 100644
--- a/clang/lib/Sema/CodeCompleteConsumer.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud