[clang] Change to range-based invocation of llvm::sort
authorMandeep Singh Grang <mgrang@codeaurora.org>
Fri, 18 Jan 2019 18:45:26 +0000 (18:45 +0000)
committerMandeep Singh Grang <mgrang@codeaurora.org>
Fri, 18 Jan 2019 18:45:26 +0000 (18:45 +0000)
llvm-svn: 351573

clang/lib/Format/Format.cpp

index 2c4f876..705b8d7 100644 (file)
@@ -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) <