From: Mandeep Singh Grang Date: Fri, 18 Jan 2019 18:45:26 +0000 (+0000) Subject: [clang] Change to range-based invocation of llvm::sort X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3a49e8ae1dd08af0dd1e844e551ec4e59cfa86d;p=clang [clang] Change to range-based invocation of llvm::sort git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351573 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 2c4f876054..705b8d7a1a 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -1868,7 +1868,7 @@ static void sortJavaImports(const FormatStyle &Style, JavaImportGroups.push_back( findJavaImportGroup(Style, Imports[i].Identifier)); } - llvm::sort(Indices.begin(), Indices.end(), [&](unsigned LHSI, unsigned RHSI) { + llvm::sort(Indices, [&](unsigned LHSI, unsigned RHSI) { // Negating IsStatic to push static imports above non-static imports. return std::make_tuple(!Imports[LHSI].IsStatic, JavaImportGroups[LHSI], Imports[LHSI].Identifier) <