[Lldb-commits] [lldb] 8f2632c - [lldb][test] Fix -Wctad-maybe-unsupported in AlarmTest.cpp (NFC)
Jie Fu via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 15 15:59:51 PDT 2024
Author: Jie Fu
Date: 2024-03-16T06:59:07+08:00
New Revision: 8f2632c45f54d1e91248be81db5d4908d1036213
URL: https://github.com/llvm/llvm-project/commit/8f2632c45f54d1e91248be81db5d4908d1036213
DIFF: https://github.com/llvm/llvm-project/commit/8f2632c45f54d1e91248be81db5d4908d1036213.diff
LOG: [lldb][test] Fix -Wctad-maybe-unsupported in AlarmTest.cpp (NFC)
llvm-project/lldb/unittests/Host/AlarmTest.cpp:49:7:
error: 'lock_guard' may not intend to support class template argument deduction [-Werror,-Wctad-maybe-unsupported]
std::lock_guard guard(m);
^
Added:
Modified:
lldb/unittests/Host/AlarmTest.cpp
Removed:
################################################################################
diff --git a/lldb/unittests/Host/AlarmTest.cpp b/lldb/unittests/Host/AlarmTest.cpp
index e5895574376e38..9f6ad189dee970 100644
--- a/lldb/unittests/Host/AlarmTest.cpp
+++ b/lldb/unittests/Host/AlarmTest.cpp
@@ -46,7 +46,7 @@ TEST(AlarmTest, Create) {
ALARM_TIMEOUT);
alarm.Create([&callbacks_actual, &m, i]() {
- std::lock_guard guard(m);
+ std::lock_guard<std::mutex> guard(m);
callbacks_actual[i] = std::chrono::system_clock::now();
});
@@ -75,7 +75,7 @@ TEST(AlarmTest, Exit) {
callbacks.emplace_back(false);
handles.push_back(alarm.Create([&callbacks, &m, i]() {
- std::lock_guard guard(m);
+ std::lock_guard<std::mutex> guard(m);
callbacks[i] = true;
}));
}
@@ -101,7 +101,7 @@ TEST(AlarmTest, Cancel) {
callbacks.emplace_back(false);
handles.push_back(alarm.Create([&callbacks, &m, i]() {
- std::lock_guard guard(m);
+ std::lock_guard<std::mutex> guard(m);
callbacks[i] = true;
}));
}
@@ -137,7 +137,7 @@ TEST(AlarmTest, Restart) {
ALARM_TIMEOUT);
handles.push_back(alarm.Create([&callbacks_actual, &m, i]() {
- std::lock_guard guard(m);
+ std::lock_guard<std::mutex> guard(m);
callbacks_actual[i] = std::chrono::system_clock::now();
}));
More information about the lldb-commits
mailing list