[Lldb-commits] [PATCH] D69166: [LLDB] Do not take address of std::iscntrl in std::remove_if

Kyrylo Bohdanenko via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 18 06:17:50 PDT 2019


KyrBoh updated this revision to Diff 225607.
KyrBoh added a comment.

Correct patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69166/new/

https://reviews.llvm.org/D69166

Files:
  lldb/source/Initialization/SystemInitializerCommon.cpp


Index: lldb/source/Initialization/SystemInitializerCommon.cpp
===================================================================
--- lldb/source/Initialization/SystemInitializerCommon.cpp
+++ lldb/source/Initialization/SystemInitializerCommon.cpp
@@ -80,7 +80,7 @@
     }
     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(), [](unsigned char c) { return std::iscntrl(c); }),
                  cwd->end());
       if (std::error_code ec = FileSystem::Instance()
                                    .GetVirtualFileSystem()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69166.225607.patch
Type: text/x-patch
Size: 708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191018/d4cd1227/attachment.bin>


More information about the lldb-commits mailing list