diff --git a/lldb/source/Host/posix/PipePosix.cpp b/lldb/source/Host/posix/PipePosix.cpp index afd3fe39059ac..f35c348990df6 100644 --- a/lldb/source/Host/posix/PipePosix.cpp +++ b/lldb/source/Host/posix/PipePosix.cpp @@ -108,7 +108,7 @@ Status PipePosix::CreateNew(bool child_processes_inherit) { } Status PipePosix::CreateNew(llvm::StringRef name, bool child_process_inherit) { - std::scoped_lock (m_read_mutex, m_write_mutex); + std::scoped_lock guard(m_read_mutex, m_write_mutex); if (CanReadUnlocked() || CanWriteUnlocked()) return Status("Pipe is already opened"); @@ -146,7 +146,7 @@ Status PipePosix::CreateWithUniqueName(llvm::StringRef prefix, Status PipePosix::OpenAsReader(llvm::StringRef name, bool child_process_inherit) { - std::scoped_lock (m_read_mutex, m_write_mutex); + std::scoped_lock guard(m_read_mutex, m_write_mutex); if (CanReadUnlocked() || CanWriteUnlocked()) return Status("Pipe is already opened");