rsandifo-arm marked 2 inline comments as done.
rsandifo-arm added inline comments.
================
Comment at: clang/lib/Sema/SemaLambda.cpp:1633
+ if (RequireCompleteSizedType(Loc, FieldType,
+ diag::err_field_incomplete_or_sizeless)) {
RD->setInvalidDecl();
----------------
efriedma wrote:
> Can BuildCaptureField actually print an error? If it can, do you have a
> testcase?
Thanks for the reviews!
The only test I could find that triggered this was:
`auto bad_init_4 = [a(void_fn())] {}; // expected-error {{has incomplete type
'void'}}`
from CXX/expr/expr.prim/expr.prim.lambda/p11-1y.cpp. This might not be the
optimal way to report the problem though.
I've added a corresponding test for the sizeless case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75737/new/
https://reviews.llvm.org/D75737
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits