diff options
Diffstat (limited to 'clang/lib/Parse/ParseStmt.cpp')
-rw-r--r-- | clang/lib/Parse/ParseStmt.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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(); |