aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseStmt.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2013-03-22 02:10:40 +0000
committerJohn McCall <rjmccall@apple.com>2013-03-22 02:10:40 +0000
commitb760f11fae94e3003b9241ac50c02617465f2fa2 (patch)
treed0709d70ccbe6150d35452e68660bde46efe7e40 /lib/Parse/ParseStmt.cpp
parentbf8487a3c290203ae54fd81d35a94be0ff211235 (diff)
Fix a crash-on-valid where a block capture copy expression was
picking up cleanups from earlier in the statement. Also fix a crash-on-invalid where a reference to an invalid decl from an enclosing scope was causing an expression to fail to build, but only *after* a cleanup was registered from that statement, causing an assertion downstream. The crash-on-valid is rdar://13459289. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177692 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseStmt.cpp')
-rw-r--r--lib/Parse/ParseStmt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp
index 71a7b2c9f9..5833fc1e1b 100644
--- a/lib/Parse/ParseStmt.cpp
+++ b/lib/Parse/ParseStmt.cpp
@@ -319,7 +319,7 @@ StmtResult Parser::ParseExprStatement() {
SkipUntil(tok::r_brace, /*StopAtSemi=*/true, /*DontConsume=*/true);
if (Tok.is(tok::semi))
ConsumeToken();
- return StmtError();
+ return Actions.ActOnExprStmtError();
}
if (Tok.is(tok::colon) && getCurScope()->isSwitchScope() &&