diff options
| author | James Dennett <jdennett@google.com> | 2013-07-10 18:29:15 +0000 |
|---|---|---|
| committer | James Dennett <jdennett@google.com> | 2013-07-10 18:29:15 +0000 |
| commit | 49007d7561212c0ae168702c1af1404c01ef43ff (patch) | |
| tree | 513c4b8958423a82623895726cdbaf463c8e1f75 /lib/CodeGen/CGExprAgg.cpp | |
| parent | 0daf1f4a0ff1cd6487c7040ac8f97eee48185536 (diff) | |
| download | clang-49007d7561212c0ae168702c1af1404c01ef43ff.tar.gz clang-49007d7561212c0ae168702c1af1404c01ef43ff.tar.bz2 clang-49007d7561212c0ae168702c1af1404c01ef43ff.tar.xz | |
Add a hook RecursiveASTVisitor::TraverseLambdaBody, to enable visitors to
use/maintain additional state from the LambdaExpr while visiting the body
of a LambdaExpr.
One use for this arises because Clang's AST currently holds lambda bodies
in a form prior to their adjustment to refer to captured copies of local
variables, and so some clients will need access to the lambda's closure
type in order to query how to map VarDecl*s to the FieldDecls of their
by-copy captures. This hook is sufficient for at least one such client;
to do this without such a hook would require the client to re-implement
the whole of TraverseLambdaExpr, which is non-trivial and would likely be
more brittle.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
0 files changed, 0 insertions, 0 deletions
