blob: 3014208b6eacf34017d8e7d2cbd0093985e40793 [file] [log] [blame]
Douglas Gregor7f43d672009-02-25 23:52:28 +00001// RUN: clang -fsyntax-only -verify %s
2namespace N {
Douglas Gregor2943aed2009-03-03 04:44:36 +00003 template<typename T> class A { };
Douglas Gregor7f43d672009-02-25 23:52:28 +00004
5 template<> class A<int> { };
6
Douglas Gregor2943aed2009-03-03 04:44:36 +00007 template<> class A<float>; // expected-note{{forward declaration of 'class A'}}
8
Douglas Gregor7f43d672009-02-25 23:52:28 +00009 class B : public A<int> { };
10}
11
12class C1 : public N::A<int> { };
13
Douglas Gregor2943aed2009-03-03 04:44:36 +000014class C2 : public N::A<float> { }; // expected-error{{base class has incomplete type}}
Douglas Gregor7f43d672009-02-25 23:52:28 +000015
16struct D1 {
17 operator N::A<int>();
18};
19
20namespace N {
21 struct D2 {
22 operator A<int>();
23 };
24}