[Lldb-commits] [lldb] r278925 - Fix unittests on windows after r278915

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 17 05:00:20 PDT 2016


Author: labath
Date: Wed Aug 17 07:00:19 2016
New Revision: 278925

URL: http://llvm.org/viewvc/llvm-project?rev=278925&view=rev
Log:
Fix unittests on windows after r278915

Apparently clang will happily capture a const variable in a lambda without it being specified in
the capture clause. MSVC does not like that.

Modified:
    lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp

Modified: lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp?rev=278925&r1=278924&r2=278925&view=diff
==============================================================================
--- lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp (original)
+++ lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp Wed Aug 17 07:00:19 2016
@@ -71,7 +71,7 @@ TEST_F(GDBRemoteCommunicationClientTest,
     const lldb::tid_t tid = 0x47;
     const uint32_t reg_num = 4;
     std::future<bool> write_result =
-        std::async(std::launch::async, [&client] { return client.WriteRegister(tid, reg_num, "ABCD"); });
+        std::async(std::launch::async, [&] { return client.WriteRegister(tid, reg_num, "ABCD"); });
 
     Handle_QThreadSuffixSupported(server, true);
 
@@ -79,7 +79,7 @@ TEST_F(GDBRemoteCommunicationClientTest,
     ASSERT_TRUE(write_result.get());
 
     write_result = std::async(std::launch::async,
-                              [&client] { return client.WriteAllRegisters(tid, "404142434445464748494a4b4c4d4e4f"); });
+                              [&] { return client.WriteAllRegisters(tid, "404142434445464748494a4b4c4d4e4f"); });
 
     HandlePacket(server, "G404142434445464748494a4b4c4d4e4f;thread:0047;", "OK");
     ASSERT_TRUE(write_result.get());
@@ -96,7 +96,7 @@ TEST_F(GDBRemoteCommunicationClientTest,
     const lldb::tid_t tid = 0x47;
     const uint32_t reg_num = 4;
     std::future<bool> write_result =
-        std::async(std::launch::async, [&client] { return client.WriteRegister(tid, reg_num, "ABCD"); });
+        std::async(std::launch::async, [&] { return client.WriteRegister(tid, reg_num, "ABCD"); });
 
     Handle_QThreadSuffixSupported(server, false);
     HandlePacket(server, "Hg47", "OK");
@@ -104,7 +104,7 @@ TEST_F(GDBRemoteCommunicationClientTest,
     ASSERT_TRUE(write_result.get());
 
     write_result = std::async(std::launch::async,
-                              [&client] { return client.WriteAllRegisters(tid, "404142434445464748494a4b4c4d4e4f"); });
+                              [&] { return client.WriteAllRegisters(tid, "404142434445464748494a4b4c4d4e4f"); });
 
     HandlePacket(server, "G404142434445464748494a4b4c4d4e4f", "OK");
     ASSERT_TRUE(write_result.get());




More information about the lldb-commits mailing list