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 | 906a7e1c0f272f7e539c82dda01f4644031ce637 (patch) | |
tree | 6b517623085dbc5a155603060b68d458e1211a74 /lib/Sema/Sema.cpp | |
parent | 2f0e88a87cea6d21429d9f5c0b1c53f24caf77cf (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/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 6a77d8c673..4ab960de0e 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -869,6 +869,13 @@ BlockScopeInfo *Sema::getCurBlock() { return dyn_cast<BlockScopeInfo>(FunctionScopes.back()); } +LambdaScopeInfo *Sema::getCurLambda() { + if (FunctionScopes.empty()) + return 0; + + return dyn_cast<LambdaScopeInfo>(FunctionScopes.back()); +} + // Pin this vtable to this file. ExternalSemaSource::~ExternalSemaSource() {} |