diff --git a/clang/lib/DPCT/ValidateArguments.cpp b/clang/lib/DPCT/ValidateArguments.cpp index 999d7dcc498e..13775d8db6ab 100644 --- a/clang/lib/DPCT/ValidateArguments.cpp +++ b/clang/lib/DPCT/ValidateArguments.cpp @@ -22,14 +22,14 @@ using namespace llvm; using namespace std; namespace path = llvm::sys::path; namespace fs = llvm::sys::fs; -bool isOutRootAccess(SmallString<256> OutRoot) { +bool isOutRootAccess(SmallString<256> &OutRoot) { if (!fs::can_write(OutRoot)) { llvm::errs() << "Could not access out-root directory.\n"; return false; } return true; } -bool isOutRootEmpty(SmallString<256> OutRoot) { +bool isOutRootEmpty(SmallString<256> &OutRoot) { std::error_code EC; fs::directory_iterator Iter(OutRoot, EC); fs::directory_iterator End;