summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Stmt.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-05-16 06:20:58 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-05-16 06:20:58 +0000
commitba71c085234044f8291b82749552a79d01f99631 (patch)
treead88c0f301afad274d85c38231e034b26b8bd300 /clang/lib/AST/Stmt.cpp
parentad9971d793e26c6d2ea28353f5b4dc6a2ee19833 (diff)
downloadbcm5719-llvm-ba71c085234044f8291b82749552a79d01f99631.tar.gz
bcm5719-llvm-ba71c085234044f8291b82749552a79d01f99631.zip
First pass of semantic analysis for init-captures: check the initializer, build
a FieldDecl from it, and propagate both into the closure type and the LambdaExpr. You can't do much useful with them yet -- you can't use them within the body of the lambda, because we don't have a representation for "the this of the lambda, not the this of the enclosing context". We also don't have support or a representation for a nested capture of an init-capture yet, which was intended to work despite not being allowed by the current standard wording. llvm-svn: 181985
Diffstat (limited to 'clang/lib/AST/Stmt.cpp')
-rw-r--r--clang/lib/AST/Stmt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp
index 5b29c073f92..7e85880b5fc 100644
--- a/clang/lib/AST/Stmt.cpp
+++ b/clang/lib/AST/Stmt.cpp
@@ -1128,7 +1128,7 @@ Stmt::child_range CapturedStmt::children() {
bool CapturedStmt::capturesVariable(const VarDecl *Var) const {
for (const_capture_iterator I = capture_begin(),
E = capture_end(); I != E; ++I) {
- if (I->capturesThis())
+ if (!I->capturesVariable())
continue;
// This does not handle variable redeclarations. This should be
OpenPOWER on IntegriCloud