jgorbe marked 2 inline comments as done. jgorbe added inline comments.
================ Comment at: clang/lib/Sema/SemaExpr.cpp:14946 + // as invalid as well. + if (const CXXRecordDecl *RD = FieldType->getAsCXXRecordDecl()) { + if (RD->isInvalidDecl()) { ---------------- rsmith wrote: > You'll need to use `FieldType->getBaseElementTypeUnsafe()` or similar here to > handle the case where the field type is an array whose element type is a > class. (That can happen in a lambda if you capture a local array variable by > value.) Done, I ended up using Context.getBaseElementType because the call to RequireCompleteType below required a QualType. ================ Comment at: clang/lib/Sema/SemaExpr.cpp:14948 + if (RD->isInvalidDecl()) { + Lambda->setInvalidDecl(); + } ---------------- rsmith wrote: > For consistency with the class case, I think we should mark the field invalid > in this case too. Done! https://reviews.llvm.org/D54550 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits