Skip to content

Commit 6b50edc

Browse files
committed
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.
1 parent ffc9fb3 commit 6b50edc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/SourceKit/tools/sourcekitd-test/sourcekitd-test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ static bool setSyntacticMacroExpansions(sourcekitd_object_t req,
427427
SmallVector<sourcekitd_object_t, 4> expansions;
428428
for (std::string &opt : opts.RequestOptions) {
429429
SmallVector<StringRef, 3> args;
430-
StringRef(opt).split(args, ":");
430+
StringRef(opt).split(args, ":", /*maxSplits=*/2);
431431
unsigned line, column;
432432

433433
if (args.size() != 3 || args[0].getAsInteger(10, line) ||

0 commit comments

Comments
 (0)