diff options
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
-rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index 47e364e3614..ec36fedc2d2 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -1342,6 +1342,7 @@ Parser::OwningExprResult Parser::ParseBlockLiteralExpression() { // If there was an error parsing the arguments, they may have // tried to use ^(x+y) which requires an argument list. Just // skip the whole block literal. + Actions.ActOnBlockError(CaretLoc, CurScope); return ExprError(); } // Inform sema that we are starting a block. @@ -1364,6 +1365,7 @@ Parser::OwningExprResult Parser::ParseBlockLiteralExpression() { if (!Tok.is(tok::l_brace)) { // Saw something like: ^expr Diag(Tok, diag::err_expected_expression); + Actions.ActOnBlockError(CaretLoc, CurScope); return ExprError(); } |