xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/PR6474.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm-only
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc namespace test0 {
4*f4a2713aSLionel Sambuc template <typename T> struct X {
5*f4a2713aSLionel Sambuc   virtual void foo();
6*f4a2713aSLionel Sambuc   virtual void bar();
7*f4a2713aSLionel Sambuc   virtual void baz();
8*f4a2713aSLionel Sambuc };
9*f4a2713aSLionel Sambuc 
foo()10*f4a2713aSLionel Sambuc template <typename T> void X<T>::foo() {}
bar()11*f4a2713aSLionel Sambuc template <typename T> void X<T>::bar() {}
baz()12*f4a2713aSLionel Sambuc template <typename T> void X<T>::baz() {}
13*f4a2713aSLionel Sambuc 
foo()14*f4a2713aSLionel Sambuc template <> void X<char>::foo() {}
bar()15*f4a2713aSLionel Sambuc template <> void X<char>::bar() {}
16*f4a2713aSLionel Sambuc }
17*f4a2713aSLionel Sambuc 
18*f4a2713aSLionel Sambuc namespace test1 {
19*f4a2713aSLionel Sambuc template <typename T> struct X {
20*f4a2713aSLionel Sambuc   virtual void foo();
21*f4a2713aSLionel Sambuc   virtual void bar();
22*f4a2713aSLionel Sambuc   virtual void baz();
23*f4a2713aSLionel Sambuc };
24*f4a2713aSLionel Sambuc 
foo()25*f4a2713aSLionel Sambuc template <typename T> void X<T>::foo() {}
bar()26*f4a2713aSLionel Sambuc template <typename T> void X<T>::bar() {}
baz()27*f4a2713aSLionel Sambuc template <typename T> void X<T>::baz() {}
28*f4a2713aSLionel Sambuc 
bar()29*f4a2713aSLionel Sambuc template <> void X<char>::bar() {}
foo()30*f4a2713aSLionel Sambuc template <> void X<char>::foo() {}
31*f4a2713aSLionel Sambuc }
32