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
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 11468e8..4db266b 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -9576,6 +9576,7 @@
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