From c38ba6697fc8b9f5cb577d27c07dc9ff46ae6b17 Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Mon, 30 Oct 2017 22:55:11 +0000 Subject: Typo correct the condition of 'do-while' before exiting its scope rdar://35172419 llvm-svn: 316966 --- clang/lib/Parse/ParseStmt.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/Parse/ParseStmt.cpp') diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp index 65c3f21f2d9..e8cf7d5fa45 100644 --- a/clang/lib/Parse/ParseStmt.cpp +++ b/clang/lib/Parse/ParseStmt.cpp @@ -1479,6 +1479,9 @@ StmtResult Parser::ParseDoStatement() { DiagnoseAndSkipCXX11Attributes(); ExprResult Cond = ParseExpression(); + // Correct the typos in condition before closing the scope. + if (Cond.isUsable()) + Cond = Actions.CorrectDelayedTyposInExpr(Cond); T.consumeClose(); DoScope.Exit(); -- cgit v1.2.3