summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Parse/ParseExpr.cpp2
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
2 files changed, 3 insertions, 1 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();
}
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 4df6feec9f6..b580b01bc45 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -3155,7 +3155,7 @@ Sema::DeclPtrTy Sema::ActOnFinishFunctionBody(DeclPtrTy D, StmtArg BodyArg) {
PopDeclContext();
// Verify and clean out per-function state.
- //assert(&getLabelMap() == &FunctionLabelMap && "Didn't pop block right?");
+ assert(&getLabelMap() == &FunctionLabelMap && "Didn't pop block right?");
bool HaveLabels = !FunctionLabelMap.empty();
// Check goto/label use.
OpenPOWER on IntegriCloud