diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-01-06 03:05:34 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-01-06 03:05:34 +0000 |
commit | 4817cf72f68324ba1a0683fbe4e7973793c40b95 (patch) | |
tree | 90661837fbe4750fc8db00e1351c666b22830cd6 /clang/lib/Parse/ParseExprCXX.cpp | |
parent | b3851f5ca15e7b3d0c8a272b1bd4d58bf99fedac (diff) | |
download | bcm5719-llvm-4817cf72f68324ba1a0683fbe4e7973793c40b95.tar.gz bcm5719-llvm-4817cf72f68324ba1a0683fbe4e7973793c40b95.zip |
More lambda work. Fixes a minor bug Richard pointed out, makes lookup for lambda parameters work correctly, recording more information into the AST.
llvm-svn: 147650
Diffstat (limited to 'clang/lib/Parse/ParseExprCXX.cpp')
-rw-r--r-- | clang/lib/Parse/ParseExprCXX.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Parse/ParseExprCXX.cpp b/clang/lib/Parse/ParseExprCXX.cpp index e54858f7471..cad0a4ae6c1 100644 --- a/clang/lib/Parse/ParseExprCXX.cpp +++ b/clang/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(); |