[cfe-commits] r56668 - in /cfe/trunk: lib/Parse/ParseObjc.cpp test/Sema/rdar6248119.m
Ted Kremenek
kremenek at apple.com
Fri Sep 26 10:32:47 PDT 2008
Author: kremenek
Date: Fri Sep 26 12:32:47 2008
New Revision: 56668
URL: http://llvm.org/viewvc/llvm-project?rev=56668&view=rev
Log:
Enter a new scope for a @try block.
Modified:
cfe/trunk/lib/Parse/ParseObjc.cpp
cfe/trunk/test/Sema/rdar6248119.m
Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=56668&r1=56667&r2=56668&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Fri Sep 26 12:32:47 2008
@@ -1253,7 +1253,9 @@
}
StmtResult CatchStmts;
StmtResult FinallyStmt;
+ EnterScope(Scope::DeclScope);
StmtResult TryBody = ParseCompoundStatementBody();
+ ExitScope();
if (TryBody.isInvalid)
TryBody = Actions.ActOnNullStmt(Tok.getLocation());
Modified: cfe/trunk/test/Sema/rdar6248119.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/rdar6248119.m?rev=56668&r1=56667&r2=56668&view=diff
==============================================================================
--- cfe/trunk/test/Sema/rdar6248119.m (original)
+++ cfe/trunk/test/Sema/rdar6248119.m Fri Sep 26 12:32:47 2008
@@ -9,3 +9,19 @@
int i = 0;
}
}
+
+void f1() {
+ int i;
+ @try {
+ int i =0;
+ } @finally {
+ }
+}
+
+void f2() {
+ int i;
+ @try {
+ } @catch(id e) {
+ int i = 0;
+ }
+}
More information about the cfe-commits
mailing list