[clang] 43a1c80 - Fix another implicit conversion in the directory watcher

Jonas Devlieghere via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 28 15:28:29 PST 2020


Author: Jonas Devlieghere
Date: 2020-01-28T15:28:22-08:00
New Revision: 43a1c80508d17fa42c78b690d426105eaa84c539

URL: https://github.com/llvm/llvm-project/commit/43a1c80508d17fa42c78b690d426105eaa84c539
DIFF: https://github.com/llvm/llvm-project/commit/43a1c80508d17fa42c78b690d426105eaa84c539.diff

LOG: Fix another implicit conversion in the directory watcher

Added: 
    

Modified: 
    clang/lib/DirectoryWatcher/mac/DirectoryWatcher-mac.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/DirectoryWatcher/mac/DirectoryWatcher-mac.cpp b/clang/lib/DirectoryWatcher/mac/DirectoryWatcher-mac.cpp
index 88bab18169a8..2cae847e7657 100644
--- a/clang/lib/DirectoryWatcher/mac/DirectoryWatcher-mac.cpp
+++ b/clang/lib/DirectoryWatcher/mac/DirectoryWatcher-mac.cpp
@@ -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


        


More information about the cfe-commits mailing list