<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jul 21, 2014 at 5:43 AM, Alexey Bataev <span dir="ltr"><<a href="mailto:a.bataev@hotmail.com" target="_blank">a.bataev@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Updated version after last review. Unfortunately, I don't think it is possible to pass captured expression as a VariableLengthArray *. I have to capture expr of VariableLengthArray * and then cast it to SizeExpr->getType() type to make lambda capture this type, not VariableLengthArray *. I have to pass actual value of SizeExpr to the Lambda in this field, because it is defined only in calling function and in Lambda it can be received only in one of captured fields.</blockquote>
<div><br></div><div>I don't understand what you're saying. What I'm suggesting is storing the VariableLengthArray* in the InitializerOrBitWidth field on FieldDecl, instead of storing the array bound there.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
<a href="http://reviews.llvm.org/D4368" target="_blank">http://reviews.llvm.org/D4368</a><br>
<br>
Files:<br>
  include/clang/AST/Decl.h<br>
  include/clang/AST/LambdaCapture.h<br>
  include/clang/Basic/DiagnosticSemaKinds.td<br>
  lib/AST/Decl.cpp<br>
  lib/AST/Expr.cpp<br>
  lib/AST/ExprCXX.cpp<br>
  lib/AST/StmtPrinter.cpp<br>
  lib/AST/StmtProfile.cpp<br>
  lib/CodeGen/CGDebugInfo.cpp<br>
  lib/CodeGen/CGExprCXX.cpp<br>
  lib/CodeGen/CodeGenFunction.cpp<br>
  lib/Sema/SemaDecl.cpp<br>
  lib/Sema/SemaExpr.cpp<br>
  lib/Sema/TreeTransform.h<br>
  test/CodeGenCXX/instantiate-typeof-vla.cpp<br>
  test/SemaTemplate/instantiate-typeof.cpp<br>
  tools/libclang/IndexBody.cpp<br>
</div></div></blockquote></div><br></div></div>