summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseStmt.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2017-10-30 22:55:11 +0000
committerAlex Lorenz <arphaman@gmail.com>2017-10-30 22:55:11 +0000
commitc38ba6697fc8b9f5cb577d27c07dc9ff46ae6b17 (patch)
tree76f9a3482efe52cb597ad84fa7eaf47952c40861 /clang/lib/Parse/ParseStmt.cpp
parenta544c51e94445ad655e512af690cb214aac73321 (diff)
downloadbcm5719-llvm-c38ba6697fc8b9f5cb577d27c07dc9ff46ae6b17.tar.gz
bcm5719-llvm-c38ba6697fc8b9f5cb577d27c07dc9ff46ae6b17.zip
Typo correct the condition of 'do-while' before exiting its scope
rdar://35172419 llvm-svn: 316966
Diffstat (limited to 'clang/lib/Parse/ParseStmt.cpp')
-rw-r--r--clang/lib/Parse/ParseStmt.cpp3
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();
OpenPOWER on IntegriCloud