[PATCH] Fix PR20619 - failure to define implicit copy ctor of a by val capture in a generic lambda
Faisal Vali
faisalv at gmail.com
Sun Mar 1 11:15:34 PST 2015
Per Richard's suggestion, I moved the creation of the initializer expression (including analysis of conversion and generation of implicit functions) following the popping off of the lambda's call operator. This solution seems to work well.
In passing the following bug regarding VLA's was also fixed:
void foo(int I) {
int v[I];
int x[10];
auto L = [=, &v] (int n) { return v[n] + x[n]; } // Now works
}
Thanks!
}
http://reviews.llvm.org/D6171
Files:
include/clang/Sema/ScopeInfo.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaLambda.cpp
test/CXX/expr/expr.prim/expr.prim.lambda/p2.cpp
test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp
test/SemaCXX/cxx1y-generic-lambdas-pr20619.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6171.20962.patch
Type: text/x-patch
Size: 25839 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150301/cedc9c22/attachment.bin>
More information about the cfe-commits
mailing list