summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/ASTUnit.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/Frontend/ASTUnit.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/Frontend/ASTUnit.cpp')
-rw-r--r--clang/lib/Frontend/ASTUnit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index 874fd012b3c..452803acd29 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -1678,7 +1678,9 @@ void AugmentedCodeCompleteConsumer::ProcessCodeCompleteResults(Sema &S,
Next.ProcessCodeCompleteResults(S, Context, Results, NumResults);
return;
}
-
+
+ // Sort the completion results before passing them on to the actual consumer.
+ std::stable_sort(AllResults.begin(), AllResults.end());
Next.ProcessCodeCompleteResults(S, Context, AllResults.data(),
AllResults.size());
OpenPOWER on IntegriCloud