diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp index 7bdb112cd1993..67b02a28ceeb8 100644 --- a/lib/Parse/ParseStmt.cpp +++ b/lib/Parse/ParseStmt.cpp @@ -771,8 +771,8 @@ ParserResult Parser::parseStmtReturn(SourceLoc tryLoc) { // Issue a warning when the returned expression is on a different line than // the return keyword, but both have the same indentation. - if (SourceMgr.getPresumedLineAndColumnForLoc(ReturnLoc).second == - SourceMgr.getPresumedLineAndColumnForLoc(ExprLoc).second) { + if (SourceMgr.getLineAndColumnInBuffer(ReturnLoc).second == + SourceMgr.getLineAndColumnInBuffer(ExprLoc).second) { diagnose(ExprLoc, diag::unindented_code_after_return); diagnose(ExprLoc, diag::indent_expression_to_silence); } diff --git a/lib/Sema/MiscDiagnostics.cpp b/lib/Sema/MiscDiagnostics.cpp index 4f6faa96c55b2..8d5b52db5b505 100644 --- a/lib/Sema/MiscDiagnostics.cpp +++ b/lib/Sema/MiscDiagnostics.cpp @@ -3163,7 +3163,7 @@ static void checkSwitch(ASTContext &ctx, const SwitchStmt *stmt) { continue; auto &SM = ctx.SourceMgr; - auto prevLineCol = SM.getPresumedLineAndColumnForLoc(prevLoc); + auto prevLineCol = SM.getLineAndColumnInBuffer(prevLoc); if (SM.getLineAndColumnInBuffer(thisLoc).first != prevLineCol.first) continue; diff --git a/stdlib/public/core/SequenceAlgorithms.swift b/stdlib/public/core/SequenceAlgorithms.swift index 7b1e8f263e734..0af14d64144fa 100644 --- a/stdlib/public/core/SequenceAlgorithms.swift +++ b/stdlib/public/core/SequenceAlgorithms.swift @@ -794,8 +794,8 @@ extension Sequence { return try _compactMap(transform) } - // The implementation of flatMap accepting a closure with an optional result. - // Factored out into a separate functions in order to be used in multiple + // The implementation of compactMap accepting a closure with an optional result. + // Factored out into a separate function in order to be used in multiple // overloads. @inlinable // protocol-only @inline(__always)