diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-05-04 16:12:48 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-05-04 16:12:48 +0000 |
commit | 8aaf5818a64e9f7687798852af5945b053c68a54 (patch) | |
tree | d6a70c3518b8dea8be7062438d7e8676820ed17f /test/SemaTemplate/instantiate-function-params.cpp | |
parent | 71438373cd57f0d5d8c93bb5cf690844a0fbc9d0 (diff) | |
download | FreeBSD-src-8aaf5818a64e9f7687798852af5945b053c68a54.zip FreeBSD-src-8aaf5818a64e9f7687798852af5945b053c68a54.tar.gz |
Update clang to r103004.
Diffstat (limited to 'test/SemaTemplate/instantiate-function-params.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-function-params.cpp | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/test/SemaTemplate/instantiate-function-params.cpp b/test/SemaTemplate/instantiate-function-params.cpp index ea8dd70..45de342 100644 --- a/test/SemaTemplate/instantiate-function-params.cpp +++ b/test/SemaTemplate/instantiate-function-params.cpp @@ -3,13 +3,13 @@ // PR6619 template<bool C> struct if_c { }; template<typename T1> struct if_ { - typedef if_c< static_cast<bool>(T1::value)> almost_type_; // expected-note 7{{in instantiation}} + typedef if_c< static_cast<bool>(T1::value)> almost_type_; // expected-note 5{{in instantiation}} }; template <class Model, void (Model::*)()> struct wrap_constraints { }; template <class Model> -inline char has_constraints_(Model* , // expected-note 4{{while substituting deduced template arguments into function template 'has_constraints_' [with }} \ +inline char has_constraints_(Model* , // expected-note 2{{while substituting deduced template arguments into function template 'has_constraints_' [with }} \ // expected-note 3{{candidate template ignored}} - wrap_constraints<Model,&Model::constraints>* = 0); // expected-note 4{{in instantiation}} + wrap_constraints<Model,&Model::constraints>* = 0); // expected-note 2{{in instantiation}} template <class Model> struct not_satisfied { static const bool value = sizeof( has_constraints_((Model*)0) == 1); // expected-error 3{{no matching function}} @@ -17,20 +17,18 @@ template <class Model> struct not_satisfied { template <class ModelFn> struct requirement_; template <void(*)()> struct instantiate { }; -template <class Model> struct requirement_<void(*)(Model)> : if_< not_satisfied<Model> >::type { // expected-error 3{{no type named}} \ - // expected-note 7{{in instantiation}} +template <class Model> struct requirement_<void(*)(Model)> : if_< not_satisfied<Model> >::type { // expected-note 5{{in instantiation}} }; template <class Model> struct usage_requirements { }; template < typename TT > struct InputIterator { - typedef instantiate< & requirement_<void(*)(usage_requirements<InputIterator> x)>::failed> boost_concept_check1; // expected-note 2{{in instantiation}} + typedef instantiate< & requirement_<void(*)(usage_requirements<InputIterator> x)>::failed> boost_concept_check1; // expected-note {{in instantiation}} }; -template < typename TT > struct ForwardIterator : InputIterator<TT> { // expected-note 2{{in instantiation}} - typedef instantiate< & requirement_<void(*)(usage_requirements<ForwardIterator> x)>::failed> boost_concept_check2; // expected-note 2 {{in instantiation}} +template < typename TT > struct ForwardIterator : InputIterator<TT> { // expected-note {{in instantiation}} + typedef instantiate< & requirement_<void(*)(usage_requirements<ForwardIterator> x)>::failed> boost_concept_check2; // expected-note {{in instantiation}} }; -typedef instantiate< &requirement_<void(*)(ForwardIterator<char*> x)>::failed> boost_concept_checkX; // expected-error{{no member named}} \ -// expected-note 6{{in instantiation}} +typedef instantiate< &requirement_<void(*)(ForwardIterator<char*> x)>::failed> boost_concept_checkX;// expected-note 3{{in instantiation}} template<typename T> struct X0 { }; template<typename R, typename A1> struct X0<R(A1 param)> { }; @@ -55,3 +53,26 @@ void use_func_ptr() { }; template void use_func_ptr<int, float, double>(); + +namespace PR6990 { + template < typename , typename = int, typename = int > struct X1; + template <typename > + struct X2; + + template <typename = int *, typename TokenT = int, + typename = int( X2<TokenT> &)> + struct X3 + { + }; + + template <typename , typename P> + struct X3_base : X3< X1<int, P> > + { + protected: typedef X1< P> type; + X3<type> e; + }; + + struct r : X3_base<int, int> + { + }; +} |