temp.cpp 723 B

12345678910111213141516171819
  1. // RUN: %clang_cc1 -fsyntax-only -verify %s
  2. namespace test0 {
  3. // p3
  4. template<typename T> int foo(T), bar(T, T); // expected-error{{single entity}}
  5. }
  6. // PR7252
  7. namespace test1 {
  8. namespace A { template<typename T> struct Base { typedef T t; }; } // expected-note {{member found}}
  9. namespace B { template<typename T> struct Base { typedef T t; }; } // expected-note {{member found}}
  10. template<typename T> struct Derived : A::Base<char>, B::Base<int> {
  11. // FIXME: the syntax error here is unfortunate
  12. typename Derived::Base<float>::t x; // expected-error {{found in multiple base classes of different types}} \
  13. // expected-error {{expected member name or ';'}}
  14. };
  15. }