summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-03-09 03:17:15 +0000
committerNico Weber <nicolasweber@gmx.de>2015-03-09 03:17:15 +0000
commitce90329824037c89af64a5ee852e4c86f0c62cc7 (patch)
tree69257a102a93ca8f330c72f704bef52722df4ca3 /clang/lib/Sema/SemaStmt.cpp
parent75eda5e913d9fb9539ba79dba625bc98fe91ad31 (diff)
downloadbcm5719-llvm-ce90329824037c89af64a5ee852e4c86f0c62cc7.tar.gz
bcm5719-llvm-ce90329824037c89af64a5ee852e4c86f0c62cc7.zip
Fix a theoretical bug when ParseCompoundStatement() returns StmtError.
ParseCompoundStatement() currently never returns StmtError, but if it did, Sema would keep the __finally scope on its stack indefinitely. Explicitly add an error callback that clears it. llvm-svn: 231625
Diffstat (limited to 'clang/lib/Sema/SemaStmt.cpp')
-rw-r--r--clang/lib/Sema/SemaStmt.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index 11ec4f5321e..1710c976afd 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/lib/Sema/SemaStmt.cpp
@@ -3422,6 +3422,10 @@ void Sema::ActOnStartSEHFinallyBlock() {
CurrentSEHFinally.push_back(CurScope);
}
+void Sema::ActOnAbortSEHFinallyBlock() {
+ CurrentSEHFinally.pop_back();
+}
+
StmtResult Sema::ActOnFinishSEHFinallyBlock(SourceLocation Loc, Stmt *Block) {
assert(Block);
CurrentSEHFinally.pop_back();
OpenPOWER on IntegriCloud