Merge pull request #3862 from RLovelett/bugfix/typo-in-sourcekitd-test

[SourceKit] Fix typo in sourcekitd-test error handler response
This commit is contained in:
Dmitri Gribenko
2016-08-04 13:06:28 -07:00
committed by GitHub
2 changed files with 6 additions and 6 deletions

View File

@@ -24,15 +24,15 @@ swift::ide::parseLineCol(StringRef LineCol) {
unsigned Line, Col;
size_t ColonIdx = LineCol.find(':');
if (ColonIdx == StringRef::npos) {
llvm::errs() << "wrong pos format, it should be '<line>:<column'\n";
llvm::errs() << "wrong pos format, it should be '<line>:<column>'\n";
return None;
}
if (LineCol.substr(0, ColonIdx).getAsInteger(10, Line)) {
llvm::errs() << "wrong pos format, it should be '<line>:<column'\n";
llvm::errs() << "wrong pos format, it should be '<line>:<column>'\n";
return None;
}
if (LineCol.substr(ColonIdx+1).getAsInteger(10, Col)) {
llvm::errs() << "wrong pos format, it should be '<line>:<column'\n";
llvm::errs() << "wrong pos format, it should be '<line>:<column>'\n";
return None;
}

View File

@@ -61,15 +61,15 @@ static std::pair<unsigned, unsigned> parseLineCol(StringRef LineCol) {
unsigned Line, Col;
size_t ColonIdx = LineCol.find(':');
if (ColonIdx == StringRef::npos) {
llvm::errs() << "wrong pos format, it should be '<line>:<column'\n";
llvm::errs() << "wrong pos format, it should be '<line>:<column>'\n";
exit(1);
}
if (LineCol.substr(0, ColonIdx).getAsInteger(10, Line)) {
llvm::errs() << "wrong pos format, it should be '<line>:<column'\n";
llvm::errs() << "wrong pos format, it should be '<line>:<column>'\n";
exit(1);
}
if (LineCol.substr(ColonIdx+1).getAsInteger(10, Col)) {
llvm::errs() << "wrong pos format, it should be '<line>:<column'\n";
llvm::errs() << "wrong pos format, it should be '<line>:<column>'\n";
exit(1);
}