xref: /minix3/external/bsd/llvm/dist/clang/test/SemaTemplate/temp.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc namespace test0 {
5*f4a2713aSLionel Sambuc   // p3
6*f4a2713aSLionel Sambuc   template<typename T> int foo(T), bar(T, T); // expected-error{{single entity}}
7*f4a2713aSLionel Sambuc }
8*f4a2713aSLionel Sambuc 
9*f4a2713aSLionel Sambuc // PR7252
10*f4a2713aSLionel Sambuc namespace test1 {
11*f4a2713aSLionel Sambuc   namespace A { template<typename T> struct Base { typedef T t; }; } // expected-note {{member found}}
12*f4a2713aSLionel Sambuc   namespace B { template<typename T> struct Base { typedef T t; }; } // expected-note {{member found}}
13*f4a2713aSLionel Sambuc 
14*f4a2713aSLionel Sambuc   template<typename T> struct Derived : A::Base<char>, B::Base<int> {
15*f4a2713aSLionel Sambuc     // FIXME: the syntax error here is unfortunate
16*f4a2713aSLionel Sambuc     typename Derived::Base<float>::t x; // expected-error {{found in multiple base classes of different types}} \
17*f4a2713aSLionel Sambuc                                         // expected-error {{expected member name or ';'}}
18*f4a2713aSLionel Sambuc   };
19*f4a2713aSLionel Sambuc }
20