Fix sorting of using directives, from Jay Foad

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72048 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index 8942523..8fe287c 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -713,7 +713,7 @@
       AddScopeUsingDirectives(Context, SC, UDirs);
 
   // Sort heapified UsingDirectiveDecls.
-  std::sort_heap(UDirs.begin(), UDirs.end());
+  std::sort_heap(UDirs.begin(), UDirs.end(), UsingDirAncestorCompare());
 
   // Lookup namespace scope, and global scope.
   // Unqualified name lookup in C++ requires looking into scopes