On Apr 15, 2009, at 12:08 PM, Eli Friedman wrote: > On Wed, Apr 15, 2009 at 7:38 AM, Steve Naroff <[email protected]> > wrote: >> Author: snaroff >> Date: Wed Apr 15 09:38:36 2009 >> New Revision: 69165 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=69165&view=rev >> Log: >> Fix <rdar://problem/6791490> [clang10 regression] [sema] invalid >> illegal jump diagnostic. >> >> caused by: <rdar://problem/6252084> [sema] jumps into Obj-C >> exception blocks should be disallowed. > > Ah, hmm, I figured there was a problem like this; I didn't reply > earlier because I didn't get a chance to test. > >> Sema::RecursiveCalcLabelScopes() and >> Sema::RecursiveCalcJumpScopes() need to pop the ScopeStack within >> the statement iteration loop (was outside the loop). > > That looks very wrong... if I'm not mistaken, the following testcase > breaks. > > int test4(int x) { > goto L; // expected-error{{illegal jump}} > int a[x]; > test4(x); > L: > return sizeof a; > } > > The correct solution is to use the correct parent in the PopScopeMap, > which for an @try is either the @try itself or the containing > ObjCAtTryStmt. >
O.k. I'll take a look. I'll also add the test case above (which would have been helpful). Thanks, snaroff > -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
