forked from OSchip/llvm-project
d60b82f93e
Specifically, when we have this situation: struct A { template <typename T> struct B { int m1 = sizeof(A); }; B<int> m2; }; We can't parse m1's initializer eagerly because we need A to be complete. Therefore we wait until the end of A's class scope to parse it. However, we can trigger instantiation of B before the end of A, which will attempt to instantiate the field decls eagerly, and it would build a bad field decl instantiation that said it had an initializer but actually lacked one. Fixed by deferring instantiation of default member initializers until they are needed during constructor analysis. This addresses a long standing FIXME in the code. Fixes PR19195. Reviewed By: rsmith Differential Revision: http://reviews.llvm.org/D5690 llvm-svn: 222192 |
||
---|---|---|
.. | ||
basic | ||
class | ||
class.access | ||
class.derived | ||
conv | ||
dcl.dcl | ||
dcl.decl | ||
drs | ||
except | ||
expr | ||
lex | ||
over | ||
special | ||
stmt.stmt | ||
temp |