diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-01-04 19:47:19 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-01-04 19:47:19 +0000 |
commit | a7d5ec9a1fb253c7b2f1fb3dd6605707b30c57f0 (patch) | |
tree | 62f06becfb130584ae7eff90b3348430c8f27bd8 /clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp | |
parent | 0192e97911be5102b69be5148ca1e992748cfe3d (diff) | |
download | bcm5719-llvm-a7d5ec9a1fb253c7b2f1fb3dd6605707b30c57f0.tar.gz bcm5719-llvm-a7d5ec9a1fb253c7b2f1fb3dd6605707b30c57f0.zip |
Factor out duplicated code and simplify.
No functionality change intended.
llvm-svn: 290996
Diffstat (limited to 'clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp')
-rw-r--r-- | clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp index c8595d2e364..b49a8a2ae45 100644 --- a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp @@ -104,7 +104,7 @@ template <typename T> T deduce_ref(const std::initializer_list<T>&); // expected-note {{conflicting types for parameter 'T' ('int' vs. 'double')}} template<typename T, typename U> struct pair { pair(...); }; -template<typename T> void deduce_pairs(std::initializer_list<pair<T, typename T::type>>); +template<typename T> void deduce_pairs(std::initializer_list<pair<T, typename T::type>>); // expected-note {{something}} struct WithIntType { typedef int type; }; template<typename ...T> void deduce_after_init_list_in_pack(void (*)(T...), T...); // expected-note {{<int, int> vs. <(no value), double>}} @@ -123,7 +123,7 @@ void argument_deduction() { pair<WithIntType, int> pi; pair<WithIntType, float> pf; deduce_pairs({pi, pi, pi}); // ok - deduce_pairs({pi, pf, pi}); // FIXME: This should be rejected, as we fail to produce a type that exactly matches the argument type. + deduce_pairs({pi, pf, pi}); // expected-error {{no matching function}} deduce_after_init_list_in_pack((void(*)(int,int))0, {}, 0); deduce_after_init_list_in_pack((void(*)(int,int))0, {}, 0.0); // expected-error {{no matching function}} |