[cfe-commits] r69437 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/Sema/scope-check.c test/SemaObjC/scope-check-try-catch.m

Chris Lattner sabre at nondot.org
Sat Apr 18 14:30:38 PDT 2009


On Apr 18, 2009, at 1:54 PM, Eli Friedman wrote:

> On Sat, Apr 18, 2009 at 2:36 AM, Chris Lattner <sabre at nondot.org>  
> wrote:
>> +    // Disallow jumps into any part of an @try statement by  
>> pushing a scope and
>> +    // walking all sub-stmts in that scope.
>> +    if (ObjCAtTryStmt *AT = dyn_cast<ObjCAtTryStmt>(SubStmt)) {
>> +      Scopes.push_back(GotoScope(ParentScope,  
>> diag::note_protected_by_objc_try,
>> +                                 AT->getAtTryLoc()));
>> +      // Recursively walk the AST.
>> +      BuildScopeInformation(SubStmt, Scopes.size()-1);
>> +      continue;
>>     }
>
> I think this doesn't catch "@try { goto L; } @catch (...) {L: ;}"; was
> that intentional?

Aha! Nice "catch" (har har).  Fixed in r69477.  Thanks Eli!

-Chris



More information about the cfe-commits mailing list