From 49f67ce4b3ec401bbc3591dd7b4fd443fbced874 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 26 Aug 2010 13:48:20 +0000 Subject: Move the sorting of code-completion results out of the main path and into the clients, e.g., the printing code-completion consumer and c-index-test. Clients may want to re-sort the results anyway. Provide a libclang function that sorts the results. 3rd try. How embarrassing. llvm-svn: 112180 --- clang/lib/Frontend/ASTUnit.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'clang/lib/Frontend') diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index 452803acd29..874fd012b3c 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -1678,9 +1678,7 @@ 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()); -- cgit v1.2.3