From: Douglas Gregor Date: Mon, 18 May 2009 22:06:54 +0000 (+0000) Subject: Fix sorting of using directives, from Jay Foad X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b738e08cad7c9362e82a1384cf81fdce07d1b6ba;p=clang 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 89425238e7..8fe287cb41 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -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