Require the type of a by-copy capture to be complete before creating its field.
The problem here is more serious than the fix implies. Adding a field
to a class updates the triviality bits for the class (among other
things). Failing to require a complete type before adding the field
meant that these updates don't happen in the well-formed case where
the capture is an uninstantiated class template specialization,
leading the lambda itself to be treated as having a trivial copy
constructor when it shouldn't. Fixes <rdar://problem/
15560464>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197623
91177308-0d34-0410-b5e6-
96231b3b80d8