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;