diff options
| -rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index ad45ab114fd..3e02e46ddc7 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -339,7 +339,7 @@ Parser::ParseRHSOfBinaryExpression(ExprResult LHS, prec::Level MinPrec) {          ColonLoc = Tok.getLocation();        }      } -     +      // Code completion for the right-hand side of an assignment expression      // goes through a special hook that takes the left-hand side into account.      if (Tok.is(tok::code_completion) && NextTokPrec == prec::Assignment) { @@ -347,7 +347,7 @@ Parser::ParseRHSOfBinaryExpression(ExprResult LHS, prec::Level MinPrec) {        cutOffParsing();        return ExprError();      } -     +      // Parse another leaf here for the RHS of the operator.      // ParseCastExpression works here because all RHS expressions in C have it      // as a prefix, at least. However, in C++, an assignment-expression could @@ -456,6 +456,7 @@ Parser::ParseRHSOfBinaryExpression(ExprResult LHS, prec::Level MinPrec) {        if (!getLangOpts().CPlusPlus)          continue;      } +      // Ensure potential typos aren't left undiagnosed.      if (LHS.isInvalid()) {        Actions.CorrectDelayedTyposInExpr(OrigLHS);  | 

