Revert r112149, "Move the sorting of code-completion results out of the main
path and ...", it is failing tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112161 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index 874fd01..452803a 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -1678,7 +1678,9 @@
     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());