1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3template <class T> class A {
4  typedef int Member;
5};
6
7class B {
8  template <class T> friend class A;
9  template <class T> friend class Undeclared;
10
11  template <class T> friend typename A<T>::Member; // expected-error {{friend type templates must use an elaborated type}}
12};
13