[cfe-commits] r69178 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/Sema/scope-check.c test/SemaObjC/scope-check-try-catch.m
Steve Naroff
snaroff at apple.com
Wed Apr 15 09:58:42 PDT 2009
Author: snaroff
Date: Wed Apr 15 11:58:41 2009
New Revision: 69178
URL: http://llvm.org/viewvc/llvm-project?rev=69178&view=rev
Log:
Revert previous patch (will commit a fix soon).
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/test/Sema/scope-check.c
cfe/trunk/test/SemaObjC/scope-check-try-catch.m
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=69178&r1=69177&r2=69178&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Wed Apr 15 11:58:41 2009
@@ -2935,11 +2935,10 @@
Stmt* CurCompound = isa<CompoundStmt>(*i) ? *i : ParentCompoundStmt;
RecursiveCalcLabelScopes(LabelScopeMap, PopScopeMap, ScopeStack,
*i, CurCompound);
- while (ScopeStack.size() && PopScopeMap[ScopeStack.back()] == CurStmt) {
- ScopeStack.pop_back();
- }
}
-
+ while (ScopeStack.size() && PopScopeMap[ScopeStack.back()] == CurStmt) {
+ ScopeStack.pop_back();
+ }
}
void Sema::RecursiveCalcJumpScopes(llvm::DenseMap<Stmt*, void*>& LabelScopeMap,
@@ -2970,9 +2969,9 @@
if (isa<DeclStmt>(*i)) continue;
RecursiveCalcJumpScopes(LabelScopeMap, PopScopeMap, GotoScopeMap,
ScopeStack, *i);
- while (ScopeStack.size() && PopScopeMap[ScopeStack.back()] == CurStmt) {
- ScopeStack.pop_back();
- }
+ }
+ while (ScopeStack.size() && PopScopeMap[ScopeStack.back()] == CurStmt) {
+ ScopeStack.pop_back();
}
}
Modified: cfe/trunk/test/Sema/scope-check.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/scope-check.c?rev=69178&r1=69177&r2=69178&view=diff
==============================================================================
--- cfe/trunk/test/Sema/scope-check.c (original)
+++ cfe/trunk/test/Sema/scope-check.c Wed Apr 15 11:58:41 2009
@@ -22,3 +22,11 @@
L:
return a;
}
+
+int test4(int x) {
+ goto L; // expected-error{{illegal jump}}
+ int a[x];
+ test4(x);
+ L:
+ return sizeof a;
+}
Modified: cfe/trunk/test/SemaObjC/scope-check-try-catch.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/scope-check-try-catch.m?rev=69178&r1=69177&r2=69178&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/scope-check-try-catch.m (original)
+++ cfe/trunk/test/SemaObjC/scope-check-try-catch.m Wed Apr 15 11:58:41 2009
@@ -17,10 +17,12 @@
}
}
+#if 0
+// FIXME
void f0(int a) {
if (a) goto L0;
@try {} @finally {}
L0:
return;
}
-
+#endif
More information about the cfe-commits
mailing list