Previously, clang would crash here:
template <class T> struct S { int (^p)() = ^{ return 0; }; }; S<int> x;
The problem was that InstantiateClass() was iterating over all the decls(), which included the BlockDecl. The template instantiator doesn't know how to instantiate BlockDecls though, it knows about BlockExprs. This is typically fine because BlockExprs must be the parent of the BlockDecl. To accommodate this, delay instantiating the BlockDecl until we're instantiating the default-member-initializer.
Thanks for taking a look!
Erik