]> granicus.if.org Git - clang/commitdiff
Fix sorting of using directives, from Jay Foad
authorDouglas Gregor <dgregor@apple.com>
Mon, 18 May 2009 22:06:54 +0000 (22:06 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 18 May 2009 22:06:54 +0000 (22:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72048 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaLookup.cpp

index 89425238e7443bf41865d02f38d65038da5390c9..8fe287cb416f00ccd725456d9c98b09081be5764 100644 (file)
@@ -713,7 +713,7 @@ Sema::CppLookupName(Scope *S, DeclarationName Name,
       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