summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-03-23 23:17:58 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-03-23 23:17:58 +0000
commit2c27df7603750a91546808be8891c5dd4ddc1a46 (patch)
treef2e3163239eac7d48cce2e9f647f3e55fd49890b /clang/lib
parent775341a14ca7dc940a0e66fb637ec47fc7d86337 (diff)
downloadbcm5719-llvm-2c27df7603750a91546808be8891c5dd4ddc1a46.tar.gz
bcm5719-llvm-2c27df7603750a91546808be8891c5dd4ddc1a46.zip
Remove all uses of std::mem_fun and std::bind1st removed in C++17.
llvm-svn: 298657
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp2
-rw-r--r--clang/lib/Sema/Sema.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index e56fe2c1c1d..7e8d5161808 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -719,7 +719,7 @@ CodeGenTypes::arrangeLLVMFunctionInfo(CanQualType resultType,
ArrayRef<FunctionProtoType::ExtParameterInfo> paramInfos,
RequiredArgs required) {
assert(std::all_of(argTypes.begin(), argTypes.end(),
- std::mem_fun_ref(&CanQualType::isCanonicalAsParam)));
+ [](CanQualType T) { return T.isCanonicalAsParam(); }));
// Lookup or create unique function info.
llvm::FoldingSetNodeID ID;
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 1677d340fb3..057e43f211a 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -744,7 +744,9 @@ void Sema::ActOnEndOfTranslationUnit() {
UnusedFileScopedDecls.erase(
std::remove_if(UnusedFileScopedDecls.begin(nullptr, true),
UnusedFileScopedDecls.end(),
- std::bind1st(std::ptr_fun(ShouldRemoveFromUnused), this)),
+ [this](const DeclaratorDecl *DD) {
+ return ShouldRemoveFromUnused(this, DD);
+ }),
UnusedFileScopedDecls.end());
if (TUKind == TU_Prefix) {
OpenPOWER on IntegriCloud