diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
| commit | 9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (patch) | |
| tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /test/SemaCXX/err_init_conversion_failed.cpp | |
| parent | f73d5f23a889b93d89ddef61ac0995df40286bb8 (diff) | |
Notes
Diffstat (limited to 'test/SemaCXX/err_init_conversion_failed.cpp')
| -rw-r--r-- | test/SemaCXX/err_init_conversion_failed.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaCXX/err_init_conversion_failed.cpp b/test/SemaCXX/err_init_conversion_failed.cpp index 0652e7a9ea6a..e31f215b4528 100644 --- a/test/SemaCXX/err_init_conversion_failed.cpp +++ b/test/SemaCXX/err_init_conversion_failed.cpp @@ -43,3 +43,19 @@ void test14(const float2 in, const float2 out) { const float4 V = (float4){ in, out }; // expected-error@-1{{cannot initialize a compound literal initializer}} } + +namespace template_test { +class S { +public: + void foo(int); +}; + +template <class P> struct S2 { + void (P::*a)(const int &); +}; + +void test_15() { + S2<S> X = {&S::foo}; + // expected-error-re@-1{{cannot initialize a member subobject of type 'void (template_test::S::*)(const int &){{( __attribute__\(\(thiscall\)\))?}}' with an rvalue of type 'void (template_test::S::*)(int){{( __attribute__\(\(thiscall\)\))?}}': type mismatch at 1st parameter ('const int &' vs 'int')}} +} +} |
