From: Richard Smith Date: Fri, 5 Sep 2014 00:17:00 +0000 (+0000) Subject: Remove suppression of dr547 test and instead test that deduction succeeds if we X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=77f909b268d79378221b4163112596afe177d177;p=clang Remove suppression of dr547 test and instead test that deduction succeeds if we use __thiscall. (This doesn't actually work for MSVC; they don't allow the __thiscall qualifier here, but it's sufficient to demonstrate that we do implement the intent of the DR.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217213 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CXX/drs/dr5xx.cpp b/test/CXX/drs/dr5xx.cpp index de98c39695..9ff67f88cc 100644 --- a/test/CXX/drs/dr5xx.cpp +++ b/test/CXX/drs/dr5xx.cpp @@ -517,17 +517,25 @@ namespace dr546 { // dr546: yes template void A::f() { T::error; } } -// This is incompatible to attribute(thiscall). -#if !defined(_M_IX86) && !defined(__MINGW32__) && !defined(__MINGW64__) -namespace dr547 { // d547: yes +namespace dr547 { // dr547: yes + // When targeting the MS ABI, the type of a member function includes a + // __thiscall qualifier. This is non-conforming, but we still implement + // the intent of dr547 +#if defined(_M_IX86) || defined(__MINGW32__) || defined(__MINGW64__) +#define THISCALL __thiscall +#else +#define THISCALL +#endif + template struct X; - template struct X {}; + template struct X {}; template X f(T C::*) { return X(); } struct S { void f() const; }; - X x = f(&S::f); + X x = f(&S::f); + +#undef THISCALL } -#endif namespace dr548 { // dr548: dup 482 template struct S {}; diff --git a/www/cxx_dr_status.html b/www/cxx_dr_status.html index 14ce95ac32..dd20f5dd4b 100644 --- a/www/cxx_dr_status.html +++ b/www/cxx_dr_status.html @@ -3325,7 +3325,7 @@ and POD class 547 C++11 Partial specialization on member function types - Unknown + Yes 548