// RUN: %clang_cc1 -triple i686-unknown-unknown -fsyntax-only -verify %s // PR6619 template struct if_c { }; template struct if_ { typedef if_c< static_cast(T1::value)> almost_type_; // expected-note 7{{in instantiation}} }; template struct wrap_constraints { }; template inline char has_constraints_(Model* , // expected-note 3{{candidate template ignored}} wrap_constraints* = 0); // expected-note 4{{in instantiation}} template struct not_satisfied { static const bool value = sizeof( has_constraints_((Model*)0) == 1); // expected-error 3{{no matching function}} \ // expected-note 4{{while substituting deduced template arguments into function template 'has_constraints_' [with }} }; template struct requirement_; template struct instantiate { }; template struct requirement_ : if_< not_satisfied >::type { // expected-error 3{{no type named 'type' in}} expected-note 7{{in instantiation}} }; template struct usage_requirements { }; template < typename TT > struct InputIterator { typedef instantiate< & requirement_ x)>::failed> boost_concept_check1; // expected-note 2{{in instantiation}} }; template < typename TT > struct ForwardIterator : InputIterator { // expected-note 2{{in instantiation}} typedef instantiate< & requirement_ x)>::failed> boost_concept_check2; // expected-note 2{{in instantiation}} }; typedef instantiate< &requirement_ x)>::failed> boost_concept_checkX;// expected-note 6{{in instantiation}} template struct X0 { }; template struct X0 { }; template void instF0(X0 x0a, X0 x0b) { X0 x0c; X0 x0d; } template void instF0(X0, X0); template struct FuncPtr { }; template struct FuncPtr { }; template R unary_func(A1); template void use_func_ptr() { FuncPtr > fp1; FuncPtr > fp2; }; template void use_func_ptr(); namespace PR6990 { template < typename , typename = int, typename = int > struct X1; template struct X2; template &)> struct X3 { }; template struct X3_base : X3< X1 > { protected: typedef X1< P> type; X3 e; }; struct r : X3_base { }; } namespace InstantiateFunctionTypedef { template struct X { typedef int functype(int, int); functype func1; __attribute__((noreturn)) functype func2; typedef int stdfunctype(int, int) __attribute__((stdcall)); __attribute__((stdcall)) functype stdfunc1; stdfunctype stdfunc2; __attribute__((pcs("aapcs"))) functype pcsfunc; // expected-warning {{'pcs' calling convention is not supported for this target}} }; void f(X x) { (void)x.func1(1, 2); (void)x.func2(1, 2); (void)x.stdfunc1(1, 2); (void)x.stdfunc2(1, 2); (void)x.pcsfunc(1, 2); } }