summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2009-02-28 16:48:43 +0000
committerSteve Naroff <snaroff@apple.com>2009-02-28 16:48:43 +0000
commitd123bd05cab62bb3c641d0c2343fd94e6a96235e (patch)
tree710a9706402f096e1bed6df64d28b5e65dccab2c /clang/lib/Sema/SemaDeclObjC.cpp
parent638b836aab3e6df7a568913fad46fd70225a1d21 (diff)
downloadbcm5719-llvm-d123bd05cab62bb3c641d0c2343fd94e6a96235e.tar.gz
bcm5719-llvm-d123bd05cab62bb3c641d0c2343fd94e6a96235e.zip
Fix <rdar://problem/6451399> problems with labels and blocks.
- Move the 'LabelMap' from Sema to Scope. To avoid layering problems, the second element is now a 'StmtTy *', which makes the LabelMap a bit more verbose to deal with. - Add 'ActiveScope' to Sema. Managed by ActOnStartOfFunctionDef(), ObjCActOnStartOfMethodDef(), ActOnBlockStmtExpr(). - Changed ActOnLabelStmt(), ActOnGotoStmt(), ActOnAddrLabel(), and ActOnFinishFunctionBody() to use the new ActiveScope. - Added FIXME to workaround in ActOnFinishFunctionBody() (for dealing with C++ nested functions). llvm-svn: 65694
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index dc30ac2ea90..cc867862552 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -36,6 +36,8 @@ void Sema::ObjCActOnStartOfMethodDef(Scope *FnBodyScope, DeclTy *D) {
// Allow all of Sema to see that we are entering a method definition.
PushDeclContext(FnBodyScope, MDecl);
+ ActiveScope = FnBodyScope;
+
// Create Decl objects for each parameter, entrring them in the scope for
// binding to their use.
OpenPOWER on IntegriCloud