// RUN: clang-cc -fsyntax-only %s

template<typename T>
class X0 {
public:
  void f(T t);
};

template<typename T>
void X0<T>::f(T t) {
  t = 17;
}

// FIXME: Later, we'll want to write an explicit template
// declaration (extern template) for X0<int*>, then try to
// call X0<int*>::f. The translation unit should succeed, 
// because we're not allowed to instantiate the out-of-line
// definition of X0<T>::f. For now, this is just a parsing
// test.
extern template class X0<int>;

// RUN: clang-cc -fsyntax-only %s

template<typename T>
class X0 {
public:
  void f(T t);
  
  struct Inner {
    void g(T t);
  };
};

template<typename T>
void X0<T>::f(T t) {
  t = 17;
}

extern template class X0<int>;

extern template class X0<int*>;

template<typename T>
void X0<T>::Inner::g(T t) {
  t = 17;
}

void test_intptr(X0<int*> xi, X0<int*>::Inner xii) {
  xi.f(0);
  xii.g(0);
}

Improve testing for extern temp templates, slightly. We are (properly) suppressing the implicit instantiation of members of extern templates
Improve testing for extern temp templates, slightly. We are (properly) suppressing the implicit instantiation of members of extern templates

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@81567 91177308-0d34-0410-b5e6-96231b3b80d8
