diff options
author | Steve Naroff <snaroff@apple.com> | 2009-02-28 16:48:43 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-02-28 16:48:43 +0000 |
commit | f3cf89737965352ee02026992e2dc735824e185e (patch) | |
tree | 0d89375c08f27cb246c86fa93f7d114a7e4794ca /lib/Sema/Sema.cpp | |
parent | 10b26140bcd94373b63ff5c0811a552342c7c512 (diff) |
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 2bb6a17ac1..57ed9884ba 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -169,6 +169,8 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer) StdNamespace = 0; TUScope = 0; + ActiveScope = 0; + if (getLangOptions().CPlusPlus) FieldCollector.reset(new CXXFieldCollector()); |