r351573 - [clang] Change to range-based invocation of llvm::sort
Mandeep Singh Grang via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 18 10:45:26 PST 2019
Author: mgrang
Date: Fri Jan 18 10:45:26 2019
New Revision: 351573
URL: http://llvm.org/viewvc/llvm-project?rev=351573&view=rev
Log:
[clang] Change to range-based invocation of llvm::sort
Modified:
cfe/trunk/lib/Format/Format.cpp
Modified: cfe/trunk/lib/Format/Format.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=351573&r1=351572&r2=351573&view=diff
==============================================================================
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Fri Jan 18 10:45:26 2019
@@ -1868,7 +1868,7 @@ static void sortJavaImports(const Format
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) <
More information about the cfe-commits
mailing list