swift
a8b1dd71 - DependencyScan: avoid re-tokenising the command line in the scanner

Commit
84 days ago
DependencyScan: avoid re-tokenising the command line in the scanner We would concatenate and re-tokenise the command line even though we receive the command line pre-tokenised. This behaviour was introduced in cfde1fb693bb71f107ec09dfe92bb87ca15e990a in order to deal with paths which may be escaped. Rather than joining the arguments and re-tokenising to unescape the parameters, prefer instead to process each argument individually to unescape any parameter. By doing this, we are no longer required to ensure that the parameters are properly shell quoted prior to passing them to the scanner, but any escaped parameter will be unescaped. This repairs some of the test failures in the swift-driver test suite on Windows. Adjust the test to properly construct the command line and take the opportunity to slightly improve the test by changing a few `ASSERT_TRUE` to `EXPECT_EQ`. The former will terminate the test, the latter will continue. More importantly, the `_EQ` variant reports the LHS and RHS, allowing easier debugging.
Author
Committer
Parents
Loading