C++ defines two overloads of std::iscntrl. One in <cctype> and one in
<locale>. On linux we seem to include both which makes the std::erase_if
call ambiguous.
Wrap std::iscntrl call in a lambda to ensure regular overload
resolution.
llvm-svn: 375221
}
if (llvm::Expected<std::string> cwd =
loader->LoadBuffer<WorkingDirectoryProvider>()) {
- cwd->erase(std::remove_if(cwd->begin(), cwd->end(), std::iscntrl),
+ cwd->erase(std::remove_if(cwd->begin(), cwd->end(),
+ [](char c) { return std::iscntrl(c); }),
cwd->end());
if (std::error_code ec = FileSystem::Instance()
.GetVirtualFileSystem()