summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-09-05 00:17:00 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-09-05 00:17:00 +0000
commit8c9d2c7cc5b1e527699fa90a0054115d6cb38561 (patch)
tree1d5d9006bf07267987ebfa1611103eb49e0a347f
parenta48a53cc8e23b195e49d06f71c5d0762c6b372da (diff)
downloadbcm5719-llvm-8c9d2c7cc5b1e527699fa90a0054115d6cb38561.tar.gz
bcm5719-llvm-8c9d2c7cc5b1e527699fa90a0054115d6cb38561.zip
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.) llvm-svn: 217213
-rw-r--r--clang/test/CXX/drs/dr5xx.cpp20
-rw-r--r--clang/www/cxx_dr_status.html2
2 files changed, 15 insertions, 7 deletions
diff --git a/clang/test/CXX/drs/dr5xx.cpp b/clang/test/CXX/drs/dr5xx.cpp
index de98c396954..9ff67f88ccd 100644
--- a/clang/test/CXX/drs/dr5xx.cpp
+++ b/clang/test/CXX/drs/dr5xx.cpp
@@ -517,17 +517,25 @@ namespace dr546 { // dr546: yes
template<typename T> void A<T>::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<typename T> struct X;
- template<typename T> struct X<T() const> {};
+ template<typename T> struct X<THISCALL T() const> {};
template<typename T, typename C> X<T> f(T C::*) { return X<T>(); }
struct S { void f() const; };
- X<void() const> x = f(&S::f);
+ X<THISCALL void() const> x = f(&S::f);
+
+#undef THISCALL
}
-#endif
namespace dr548 { // dr548: dup 482
template<typename T> struct S {};
diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html
index 14ce95ac323..dd20f5dd4b2 100644
--- a/clang/www/cxx_dr_status.html
+++ b/clang/www/cxx_dr_status.html
@@ -3325,7 +3325,7 @@ and <I>POD class</I></td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#547">547</a></td>
<td>C++11</td>
<td>Partial specialization on member function types</td>
- <td class="none" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="548">
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#548">548</a></td>
OpenPOWER on IntegriCloud