[WindowsDriver] Improve VSInstallPath check for IDE subdirectory
commit2a48c5f5d597002b7e315126c69672bc11185d90
authorDimitry Andric <dimitry@andric.com>
Thu, 15 Dec 2022 20:38:07 +0000 (15 21:38 +0100)
committerDimitry Andric <dimitry@andric.com>
Thu, 15 Dec 2022 20:38:07 +0000 (15 21:38 +0100)
tree2d7fa933d673d7aa5a87b27947b80c603a44483d
parent9428084a20a8334414dc8573b54d2c9a8748ce4b
[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