Fix another implicit conversion in the directory watcher
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 28 Jan 2020 23:28:13 +0000 (15:28 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 28 Jan 2020 23:28:22 +0000 (15:28 -0800)
clang/lib/DirectoryWatcher/mac/DirectoryWatcher-mac.cpp

index 88bab18169a8d7fdee9ffad74acb8458c655ab54..2cae847e7657b1b4233e9024205232c52fcf454e 100644 (file)
@@ -221,7 +221,7 @@ llvm::Expected<std::unique_ptr<DirectoryWatcher>> clang::DirectoryWatcher::creat
 
   // We need to copy the data so the lifetime is ok after a const copy is made
   // for the block.
-  const std::string CopiedPath = Path;
+  const std::string CopiedPath = Path.str();
 
   auto InitWork = ^{
     // We need to start watching the directory before we start scanning in order