[Lldb-commits] [lldb] 7dcce4c - [lldb][windows] fix scope_exit warning (#200439)

via lldb-commits lldb-commits at lists.llvm.org
Fri May 29 09:08:26 PDT 2026


Author: Charles Zablit
Date: 2026-05-29T16:08:21Z
New Revision: 7dcce4c16da12365709adc685679df70572ac49e

URL: https://github.com/llvm/llvm-project/commit/7dcce4c16da12365709adc685679df70572ac49e
DIFF: https://github.com/llvm/llvm-project/commit/7dcce4c16da12365709adc685679df70572ac49e.diff

LOG: [lldb][windows] fix scope_exit warning (#200439)

Using the constructor rather than `make_scope_exit` is preferred.

Added: 
    

Modified: 
    lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp b/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
index 22a836f9cbed5..a672f24209090 100644
--- a/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
@@ -497,7 +497,7 @@ ConvertNtDevicePathToDosPath(llvm::ArrayRef<wchar_t> nt_path) {
              ::GetLastError());
     return std::nullopt;
   }
-  auto close_iter = llvm::make_scope_exit([&] { ::FindVolumeClose(vol_iter); });
+  llvm::scope_exit close_iter([&] { ::FindVolumeClose(vol_iter); });
 
   do {
     // FindFirstVolumeW yields "\\?\Volume{GUID}\".


        


More information about the lldb-commits mailing list