From 6b50edc6f75d7bc0bb792b178248363ca157649c Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Fri, 1 Sep 2023 18:10:07 -0700 Subject: [PATCH] SourceKit: handle Windows paths for request options Windows paths involve a `:`. Ideally, we would just use `;` as the separator rather than `:`, but for now just limit the split count to 2. --- tools/SourceKit/tools/sourcekitd-test/sourcekitd-test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/SourceKit/tools/sourcekitd-test/sourcekitd-test.cpp b/tools/SourceKit/tools/sourcekitd-test/sourcekitd-test.cpp index 03259f6b810fe..277f1748b5abc 100644 --- a/tools/SourceKit/tools/sourcekitd-test/sourcekitd-test.cpp +++ b/tools/SourceKit/tools/sourcekitd-test/sourcekitd-test.cpp @@ -427,7 +427,7 @@ static bool setSyntacticMacroExpansions(sourcekitd_object_t req, SmallVector expansions; for (std::string &opt : opts.RequestOptions) { SmallVector args; - StringRef(opt).split(args, ":"); + StringRef(opt).split(args, ":", /*maxSplits=*/2); unsigned line, column; if (args.size() != 3 || args[0].getAsInteger(10, line) ||