Skip to content

Commit 8f2632c

Browse files
committed
[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); ^
1 parent ba97dc8 commit 8f2632c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lldb/unittests/Host/AlarmTest.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ TEST(AlarmTest, Create) {
4646
ALARM_TIMEOUT);
4747

4848
alarm.Create([&callbacks_actual, &m, i]() {
49-
std::lock_guard guard(m);
49+
std::lock_guard<std::mutex> guard(m);
5050
callbacks_actual[i] = std::chrono::system_clock::now();
5151
});
5252

@@ -75,7 +75,7 @@ TEST(AlarmTest, Exit) {
7575
callbacks.emplace_back(false);
7676

7777
handles.push_back(alarm.Create([&callbacks, &m, i]() {
78-
std::lock_guard guard(m);
78+
std::lock_guard<std::mutex> guard(m);
7979
callbacks[i] = true;
8080
}));
8181
}
@@ -101,7 +101,7 @@ TEST(AlarmTest, Cancel) {
101101
callbacks.emplace_back(false);
102102

103103
handles.push_back(alarm.Create([&callbacks, &m, i]() {
104-
std::lock_guard guard(m);
104+
std::lock_guard<std::mutex> guard(m);
105105
callbacks[i] = true;
106106
}));
107107
}
@@ -137,7 +137,7 @@ TEST(AlarmTest, Restart) {
137137
ALARM_TIMEOUT);
138138

139139
handles.push_back(alarm.Create([&callbacks_actual, &m, i]() {
140-
std::lock_guard guard(m);
140+
std::lock_guard<std::mutex> guard(m);
141141
callbacks_actual[i] = std::chrono::system_clock::now();
142142
}));
143143

0 commit comments

Comments
 (0)