summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/Core
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2018-09-26 22:16:28 +0000
committerFangrui Song <maskray@google.com>2018-09-26 22:16:28 +0000
commit55fab260ca1c4b71dccf59b80ed8eb24d619125e (patch)
treedd799efb2c78796a6b75169c6b06bc2a66bdd147 /clang/lib/Tooling/Core
parentdbaeec6892b98454e3a736050bbd5a3ebf3cac7d (diff)
downloadbcm5719-llvm-55fab260ca1c4b71dccf59b80ed8eb24d619125e.tar.gz
bcm5719-llvm-55fab260ca1c4b71dccf59b80ed8eb24d619125e.zip
llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)
Summary: The convenience wrapper in STLExtras is available since rL342102. Reviewers: rsmith, #clang, dblaikie Reviewed By: rsmith, #clang Subscribers: mgrang, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52576 llvm-svn: 343147
Diffstat (limited to 'clang/lib/Tooling/Core')
-rw-r--r--clang/lib/Tooling/Core/Replacement.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/Tooling/Core/Replacement.cpp b/clang/lib/Tooling/Core/Replacement.cpp
index 67e2dcfd73c..f97bdbf6bec 100644
--- a/clang/lib/Tooling/Core/Replacement.cpp
+++ b/clang/lib/Tooling/Core/Replacement.cpp
@@ -483,12 +483,11 @@ Replacements Replacements::merge(const Replacements &ReplacesToMerge) const {
// Returns a set of non-overlapping and sorted ranges that is equivalent to
// \p Ranges.
static std::vector<Range> combineAndSortRanges(std::vector<Range> Ranges) {
- llvm::sort(Ranges.begin(), Ranges.end(),
- [](const Range &LHS, const Range &RHS) {
- if (LHS.getOffset() != RHS.getOffset())
- return LHS.getOffset() < RHS.getOffset();
- return LHS.getLength() < RHS.getLength();
- });
+ llvm::sort(Ranges, [](const Range &LHS, const Range &RHS) {
+ if (LHS.getOffset() != RHS.getOffset())
+ return LHS.getOffset() < RHS.getOffset();
+ return LHS.getLength() < RHS.getLength();
+ });
std::vector<Range> Result;
for (const auto &R : Ranges) {
if (Result.empty() ||
OpenPOWER on IntegriCloud