<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/80944>80944</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[lldb] Unittests fail to compile on Windows using MSVC 2019
</td>
</tr>
<tr>
<th>Labels</th>
<td>
lldb
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
CarlosAlbertoEnciso
</td>
</tr>
</table>
<pre>
Compiling the LLDB unittests on Windows using MSVC 2019, fails with the following error:
```
------ Build started: Project: UtilityTests, Configuration: Release x64 ------
ConstStringTest.cpp
llvm-project\lldb\unittests\Utility\ConstStringTest.cpp(150,3): error C2440: '<function-style-cast>': cannot convert from 'lldb_private::ConstString' to 'llvm::StringRef'
llvm-project\lldb\unittests\Utility\ConstStringTest.cpp(150,3): message : No constructor could take the source type, or constructor overload resolution was ambiguous
llvm-project\lldb\unittests\Utility\ConstStringTest.cpp(150,3): error C2660: 'testing::internal::EqHelper::Compare': function does not take 3 arguments
llvm-project\third-party\unittest\googletest\include\gtest/gtest.h(1407,26): message : see declaration of 'testing::internal::EqHelper::Compare'
llvm-project\lldb\unittests\Utility\ConstStringTest.cpp(150,3): error C2737: 'gtest_ar': const object must be initialized
Done building project "UtilityTests.vcxproj" -- FAILED.
```
Compiling using ninja is fine.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VE1v4zYQ_TX0ZWBDpr6sgw6OHKMF0qLY7bbHBUWNZG4pUuWHs-mvL4ay0xyCHhaIYUiiZjjz3jzqCe_VZBBbVj6w8rQRMVysazvhtPVH3aML9tFI5e2mt8NL29l5UVqZCcIF4enp9ADRqBDQBw_WwJ_KDPbZQ_SU88vnPzrg2b5hvINRKO3hWYVL2jtare0zZaFz1rH8yLITy-7XKrv903KbfvAQlR7AB-ECDiw_wm_OfkMZ6PFLUFqFl98JCbXrrBnVFJ0IyhpK-IQahUf4XhWw1ltrd9b48Dk4ZSbavJPLsga0vs7b5dah7LQeelZ2r3RZ2d16srJ7rwg_7MuM8S5nvCEAiSd0vCgyWjJes7wbo5GEcOvDi8atFD6w_DHFjiCFMTaAtOaKLsDo7EzbCMnXxamrCEhzy99yYLyGYNe067yG18gnHKnuh3Cb0XsxIdDzr5YQ--CiDNaBtFEPEMRfmHT3NjqJEF4WJJlSwn_J9opOWzGAQ291pMnAs_Ag5l5N0Ub_sdJU1V0aqkPTTPNTJqAzQq-rx79_Qr2gu49-XoTDm2J3OWGw6IHES8RzEG6KM5rwPoFwUW7YLsIlxHcerOwmayeNt4UyUscB6XV6w8_pvrsQnyKrGe949Y4gHhEGlFqsHwPY8UcZfujw67y-DT_R-irc_TOgImB7aghz9AF6BGVUUEKrf3BYYZ2sQejJIchUbviAcf7WGXZX-Z1CjHPYbuF8_Pnp8bR713Pu7nA3vNXSjDLfBCgPozK42wxtPjR5IzbY7uus5odDkVebS1vVoinHqhibvCgljvt9cxjGUpb7Pe57rDeq5RkvMp7VWVXU-2qHfc774VA2dS6KQVasyHAWSu9o3Dvrpo3yPmJ7yJqi2GjRo_bJtTlPCnBO_u3apE4fJ8-KTCui_FogqKCT06-SneDLq3WTOZNtyEQX_8fKN9Hp9hLC4ul08DOdQhUusd9JOzN-Tq6z3l4PCT8n7J7xc4L_bwAAAP__lfsZjg">