// RUN: %clang_cc1 %s template struct Foo { template struct Bar {}; // The templated declaration for class Bar should not be instantiated when // Foo is. This is to protect against PR5848; for now, this "parses" but // requires a rewrite of the templated friend code to be properly fixed. template friend struct Bar; }; Foo x;