Improve the sorting of code-completion results. We now always sort by
the "typed" text, first, then take into account
nested-name-specifiers, name hiding, etc. This means that the
resulting sort is actually alphabetical :)

llvm-svn: 93370
diff --git a/clang/lib/Sema/CodeCompleteConsumer.cpp b/clang/lib/Sema/CodeCompleteConsumer.cpp
index 0a00b42..fbd1450 100644
--- a/clang/lib/Sema/CodeCompleteConsumer.cpp
+++ b/clang/lib/Sema/CodeCompleteConsumer.cpp
@@ -426,8 +426,7 @@
     OS << "COMPLETION: ";
     switch (Results[I].Kind) {
     case Result::RK_Declaration:
-      OS << Results[I].Declaration->getNameAsString() << " : " 
-         << Results[I].Rank;
+      OS << Results[I].Declaration->getNameAsString() ;
       if (Results[I].Hidden)
         OS << " (Hidden)";
       if (CodeCompletionString *CCS 
@@ -440,13 +439,13 @@
       break;
       
     case Result::RK_Keyword:
-      OS << Results[I].Keyword << " : " << Results[I].Rank << '\n';
+      OS << Results[I].Keyword << '\n';
       break;
         
     case Result::RK_Macro: {
-      OS << Results[I].Macro->getName() << " : " << Results[I].Rank;
+      OS << Results[I].Macro->getName();
       if (CodeCompletionString *CCS 
-          = Results[I].CreateCodeCompletionString(SemaRef)) {
+            = Results[I].CreateCodeCompletionString(SemaRef)) {
         OS << " : " << CCS->getAsString();
         delete CCS;
       }
@@ -455,7 +454,7 @@
     }
         
     case Result::RK_Pattern: {
-      OS << "Pattern : " << Results[I].Rank << " : " 
+      OS << "Pattern : " 
          << Results[I].Pattern->getAsString() << '\n';
       break;
     }