diff options
author | Fangrui Song <maskray@google.com> | 2019-04-24 14:43:05 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-04-24 14:43:05 +0000 |
commit | 329eb5c6baeca0a1bd6b1a5bd55e41de786f39fa (patch) | |
tree | 4d3a4a287664e6e195367043a2ae139a9445c2a4 /lib/Format/Format.cpp | |
parent | cda3d286934fcc7de3687bb8a178947a8266d1f8 (diff) |
Use llvm::stable_sort
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359098 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r-- | lib/Format/Format.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 0cba87316e..2772db0a11 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -1780,11 +1780,10 @@ static void sortCppIncludes(const FormatStyle &Style, SmallVector<unsigned, 16> Indices; for (unsigned i = 0, e = Includes.size(); i != e; ++i) Indices.push_back(i); - std::stable_sort( - Indices.begin(), Indices.end(), [&](unsigned LHSI, unsigned RHSI) { - return std::tie(Includes[LHSI].Category, Includes[LHSI].Filename) < - std::tie(Includes[RHSI].Category, Includes[RHSI].Filename); - }); + llvm::stable_sort(Indices, [&](unsigned LHSI, unsigned RHSI) { + return std::tie(Includes[LHSI].Category, Includes[LHSI].Filename) < + std::tie(Includes[RHSI].Category, Includes[RHSI].Filename); + }); // The index of the include on which the cursor will be put after // sorting/deduplicating. unsigned CursorIndex; |