diff --git a/facebook-clang-plugins/libtooling/FileUtils.cpp b/facebook-clang-plugins/libtooling/FileUtils.cpp index afed9b3a3..3935022ee 100644 --- a/facebook-clang-plugins/libtooling/FileUtils.cpp +++ b/facebook-clang-plugins/libtooling/FileUtils.cpp @@ -41,7 +41,7 @@ std::string makeAbsolutePath(const std::string ¤tWorkingDirectory, while (llvm::sys::path::has_parent_path(path)) { path = llvm::sys::path::parent_path(path).str(); - const std::string &element(llvm::sys::path::filename(path)); + const std::string &element(llvm::sys::path::filename(path).str()); if (element == ".") { continue; }