aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-09-26 00:31:16 +0000
committerTed Kremenek <kremenek@apple.com>2008-09-26 00:31:16 +0000
commitaefc36656d3113ef32a50cea9ae0621e07c8b26c (patch)
tree0c32bd241707931a5eb0d23dd4787b34e0a148e4 /lib/Parse/ParseObjc.cpp
parent761d7f78e2dac7ea5f35828c2271e60d91e106ce (diff)
Have @finally introduce a new scope.
Fixes: <rdar://problem/6248119> @finally doesn't introduce a new scope git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56629 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index e957db4ed9..8917eeb0ff 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -1311,6 +1311,8 @@ Parser::StmtResult Parser::ParseObjCTryStmt(SourceLocation atLoc) {
} else {
assert(Tok.isObjCAtKeyword(tok::objc_finally) && "Lookahead confused?");
ConsumeToken(); // consume finally
+ EnterScope(Scope::DeclScope);
+
StmtResult FinallyBody(true);
if (Tok.is(tok::l_brace))
@@ -1322,6 +1324,7 @@ Parser::StmtResult Parser::ParseObjCTryStmt(SourceLocation atLoc) {
FinallyStmt = Actions.ActOnObjCAtFinallyStmt(AtCatchFinallyLoc,
FinallyBody.Val);
catch_or_finally_seen = true;
+ ExitScope();
break;
}
}