Enter a new scope for a @try block.

llvm-svn: 56668
This commit is contained in:
Ted Kremenek 2008-09-26 17:32:47 +00:00
parent bfc70b050b
commit 68d2190226
2 changed files with 18 additions and 0 deletions

View File

@ -1253,7 +1253,9 @@ Parser::StmtResult Parser::ParseObjCTryStmt(SourceLocation atLoc) {
}
StmtResult CatchStmts;
StmtResult FinallyStmt;
EnterScope(Scope::DeclScope);
StmtResult TryBody = ParseCompoundStatementBody();
ExitScope();
if (TryBody.isInvalid)
TryBody = Actions.ActOnNullStmt(Tok.getLocation());

View File

@ -9,3 +9,19 @@ void f0() {
int i = 0;
}
}
void f1() {
int i;
@try {
int i =0;
} @finally {
}
}
void f2() {
int i;
@try {
} @catch(id e) {
int i = 0;
}
}