summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvmc
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-18 09:36:27 +0000
committerChris Lattner <sabre@nondot.org>2009-04-18 09:36:27 +0000
commit960cc525ec729f97cb87f0fdc1f73dd39dd9cb67 (patch)
treee3740ca3ce715269a01dee9381048d93a4d51753 /llvm/tools/llvmc
parent33b9cb2eeca258ead2e1a70f4849327e780691d2 (diff)
downloadbcm5719-llvm-960cc525ec729f97cb87f0fdc1f73dd39dd9cb67.tar.gz
bcm5719-llvm-960cc525ec729f97cb87f0fdc1f73dd39dd9cb67.zip
rewrite the goto scope checking code to be more efficient, simpler,
produce better diagnostics, and be more correct in ObjC cases (fixing rdar://6803963). An example is that we now diagnose: int test1(int x) { goto L; int a[x]; int b[x]; L: return sizeof a; } with: scope-check.c:15:3: error: illegal goto into protected scope goto L; ^ scope-check.c:17:7: note: scope created by variable length array int b[x]; ^ scope-check.c:16:7: note: scope created by variable length array int a[x]; ^ instead of just saying "invalid jump". An ObjC example is: void test1() { goto L; @try { L: ; } @finally { } } t.m:6:3: error: illegal goto into protected scope goto L; ^ t.m:7:3: note: scope created by @try block @try { ^ There are a whole ton of fixme's for stuff to do, but I believe that this is a monotonic improvement over what we had. llvm-svn: 69437
Diffstat (limited to 'llvm/tools/llvmc')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud