From 92565b51aa25b7a15bcdfb628bc616866af194fb Mon Sep 17 00:00:00 2001 From: Kaelyn Takata Date: Fri, 27 Mar 2015 01:44:47 +0000 Subject: Diagnose delayed typos in an expr list that is in an invalid expression. Previously, if the expr list parsed fine but the expr to the left of the open parenthesis was invalid (when parsing the suffix of a postfix-expression), the parsed expr list was just ignored. Fixes PR23005. llvm-svn: 233347 --- clang/lib/Parse/ParseExpr.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/Parse/ParseExpr.cpp') diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index b9127e90457..72af14d068f 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -1459,6 +1459,9 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) { })) { (void)Actions.CorrectDelayedTyposInExpr(LHS); LHS = ExprError(); + } else if (LHS.isInvalid()) { + for (auto &E : ArgExprs) + Actions.CorrectDelayedTyposInExpr(E); } } } -- cgit v1.2.3