// RUN: %clang_cc1 -fsyntax-only -verify %s // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s template class vector2 {}; template class vector : vector2 {}; template void Foo2(vector2 V) {} // expected-note{{candidate template ignored: cannot deduce a type for 'T' that would make 'const T' equal 'int'}} template void Foo(vector V) {} // expected-note {{candidate template ignored: cannot deduce a type for 'T' that would make 'const T' equal 'int'}} void test() { Foo2(vector2()); // expected-error{{no matching function for call to 'Foo2'}} Foo(vector()); // expected-error{{no matching function for call to 'Foo'}} } namespace rdar13267210 { template < typename T > class A { BaseTy; // expected-error{{C++ requires a type specifier for all declarations}} }; template < typename T, int N > class C: A < T > {}; class B { C ExternalDefinitions; C &Record; void AddSourceLocation(A &R); // expected-note{{passing argument to parameter 'R' here}} void AddTemplateKWAndArgsInfo() { AddSourceLocation(Record); // expected-error{{non-const lvalue reference to type}} } }; } namespace PR16292 { class IncompleteClass; // expected-note{{forward declaration}} class BaseClass { IncompleteClass Foo; // expected-error{{field has incomplete type}} }; template class DerivedClass : public BaseClass {}; void* p = new DerivedClass; } namespace rdar14183893 { class Typ { // expected-note {{not complete}} Typ x; // expected-error {{incomplete type}} }; template class B : Typ {}; typedef B<0> TFP; class A { TFP m_p; void Enable() { 0, A(); } // expected-warning {{unused}} }; }