efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land.
LGTM ================ Comment at: clang/lib/Sema/SemaLambda.cpp:1633 + if (RequireCompleteSizedType(Loc, FieldType, + diag::err_field_incomplete_or_sizeless)) { RD->setInvalidDecl(); ---------------- rsandifo-arm wrote: > 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. Makes sense. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75737/new/ https://reviews.llvm.org/D75737 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits