Skip to content

Commit 7f9d9f6

Browse files
authored
Merge pull request #1103 from swiftwasm/master
[pull] swiftwasm from master
2 parents b87122d + a676a37 commit 7f9d9f6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/Parse/ParseStmt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,8 +771,8 @@ ParserResult<Stmt> Parser::parseStmtReturn(SourceLoc tryLoc) {
771771

772772
// Issue a warning when the returned expression is on a different line than
773773
// the return keyword, but both have the same indentation.
774-
if (SourceMgr.getPresumedLineAndColumnForLoc(ReturnLoc).second ==
775-
SourceMgr.getPresumedLineAndColumnForLoc(ExprLoc).second) {
774+
if (SourceMgr.getLineAndColumnInBuffer(ReturnLoc).second ==
775+
SourceMgr.getLineAndColumnInBuffer(ExprLoc).second) {
776776
diagnose(ExprLoc, diag::unindented_code_after_return);
777777
diagnose(ExprLoc, diag::indent_expression_to_silence);
778778
}

lib/Sema/MiscDiagnostics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3163,7 +3163,7 @@ static void checkSwitch(ASTContext &ctx, const SwitchStmt *stmt) {
31633163
continue;
31643164

31653165
auto &SM = ctx.SourceMgr;
3166-
auto prevLineCol = SM.getPresumedLineAndColumnForLoc(prevLoc);
3166+
auto prevLineCol = SM.getLineAndColumnInBuffer(prevLoc);
31673167
if (SM.getLineAndColumnInBuffer(thisLoc).first != prevLineCol.first)
31683168
continue;
31693169

stdlib/public/core/SequenceAlgorithms.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -794,8 +794,8 @@ extension Sequence {
794794
return try _compactMap(transform)
795795
}
796796

797-
// The implementation of flatMap accepting a closure with an optional result.
798-
// Factored out into a separate functions in order to be used in multiple
797+
// The implementation of compactMap accepting a closure with an optional result.
798+
// Factored out into a separate function in order to be used in multiple
799799
// overloads.
800800
@inlinable // protocol-only
801801
@inline(__always)

0 commit comments

Comments
 (0)