[WindowsDriver] Improve VSInstallPath check for IDE subdirectory
authorDimitry Andric <dimitry@andric.com>
Sun, 11 Dec 2022 18:18:21 +0000 (19:18 +0100)
committerDimitry Andric <dimitry@andric.com>
Thu, 15 Dec 2022 20:29:50 +0000 (21:29 +0100)
commitcc40dacbd0b736522d0254fb5525cde22bd5f166
tree32f8d095a5dc189b62433423dcaab2ac9bb66b0c
parent32b38d248fd3c75abc5c86ab6677b6cb08a703cc
[WindowsDriver]  Improve VSInstallPath check for IDE subdirectory

This avoids potential memory allocation failures, if VSInstallPath is
not empty, but also does not contain the string "\Common7\IDE".

Fixes: https://github.com/llvm/llvm-project/issues/59434

Reviewed By: mstorsjo

Differential Revision: https://reviews.llvm.org/D140019
llvm/lib/WindowsDriver/MSVCPaths.cpp