summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/LiveVariables.cpp
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/Analysis/LiveVariables.cpp
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/Analysis/LiveVariables.cpp')
-rw-r--r--clang/lib/Analysis/LiveVariables.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Analysis/LiveVariables.cpp b/clang/lib/Analysis/LiveVariables.cpp
index ca82515ffa5..f7bfcadf591 100644
--- a/clang/lib/Analysis/LiveVariables.cpp
+++ b/clang/lib/Analysis/LiveVariables.cpp
@@ -597,7 +597,7 @@ void LiveVariablesImpl::dumpBlockLiveness(const SourceManager &M) {
it != ei; ++it) {
vec.push_back(it->first);
}
- llvm::sort(vec.begin(), vec.end(), [](const CFGBlock *A, const CFGBlock *B) {
+ llvm::sort(vec, [](const CFGBlock *A, const CFGBlock *B) {
return A->getBlockID() < B->getBlockID();
});
@@ -617,10 +617,9 @@ void LiveVariablesImpl::dumpBlockLiveness(const SourceManager &M) {
declVec.push_back(*si);
}
- llvm::sort(declVec.begin(), declVec.end(),
- [](const Decl *A, const Decl *B) {
- return A->getBeginLoc() < B->getBeginLoc();
- });
+ llvm::sort(declVec, [](const Decl *A, const Decl *B) {
+ return A->getBeginLoc() < B->getBeginLoc();
+ });
for (std::vector<const VarDecl*>::iterator di = declVec.begin(),
de = declVec.end(); di != de; ++di) {
OpenPOWER on IntegriCloud