aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseExprCXX.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-01-06 03:05:34 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-01-06 03:05:34 +0000
commit906a7e1c0f272f7e539c82dda01f4644031ce637 (patch)
tree6b517623085dbc5a155603060b68d458e1211a74 /lib/Parse/ParseExprCXX.cpp
parent2f0e88a87cea6d21429d9f5c0b1c53f24caf77cf (diff)
More lambda work. Fixes a minor bug Richard pointed out, makes lookup for lambda parameters work correctly, recording more information into the AST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147650 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExprCXX.cpp')
-rw-r--r--lib/Parse/ParseExprCXX.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp
index e54858f747..cad0a4ae6c 100644
--- a/lib/Parse/ParseExprCXX.cpp
+++ b/lib/Parse/ParseExprCXX.cpp
@@ -792,6 +792,12 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer(
Attr, DeclEndLoc);
}
+ // FIXME: Rename BlockScope -> ClosureScope if we decide to continue using
+ // it.
+ ParseScope BodyScope(this, Scope::BlockScope | Scope::FnScope |
+ Scope::BreakScope | Scope::ContinueScope |
+ Scope::DeclScope);
+
Actions.ActOnStartOfLambdaDefinition(Intro, D, getCurScope());
// Parse compound-statement.
@@ -801,11 +807,6 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer(
return ExprError();
}
- // FIXME: Rename BlockScope -> ClosureScope if we decide to continue using
- // it.
- ParseScope BodyScope(this, Scope::BlockScope | Scope::FnScope |
- Scope::BreakScope | Scope::ContinueScope |
- Scope::DeclScope);
StmtResult Stmt(ParseCompoundStatementBody());
BodyScope.Exit();