From 3d23f78852b9405585fa33070a9f06aa32f21de3 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 9 Feb 2012 02:12:34 +0000 Subject: When we create a non-static data member in the closure object for a capture, make sure we actually add the field. llvm-svn: 150135 --- clang/lib/Sema/SemaExpr.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Sema/SemaExpr.cpp') diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 11468e86769..4db266b2edf 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -9576,6 +9576,7 @@ static ExprResult captureInLambda(Sema &S, LambdaScopeInfo *LSI, 0, false, false); Field->setImplicit(true); Field->setAccess(AS_private); + Lambda->addDecl(Field); // C++11 [expr.prim.lambda]p21: // When the lambda-expression is evaluated, the entities that -- cgit v1.2.3