summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-complete.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/instantiate-complete.cpp')
-rw-r--r--test/SemaTemplate/instantiate-complete.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/SemaTemplate/instantiate-complete.cpp b/test/SemaTemplate/instantiate-complete.cpp
index 68d5ae3cfb486..a29e9d3a74969 100644
--- a/test/SemaTemplate/instantiate-complete.cpp
+++ b/test/SemaTemplate/instantiate-complete.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple %ms_abi_triple -DMSABI -fsyntax-only -verify %s
// Tests various places where requiring a complete type involves
// instantiation of that type.
@@ -7,6 +8,9 @@ template<typename T>
struct X {
X(T);
+#ifdef MSABI
+// expected-error@+2{{data member instantiated with function type 'long (long)'}}
+#endif
T f; // expected-error{{data member instantiated with function type 'float (int)'}} \
// expected-error{{data member instantiated with function type 'int (int)'}} \
// expected-error{{data member instantiated with function type 'char (char)'}} \
@@ -40,7 +44,11 @@ void test_new() {
void test_memptr(X<long> *p1, long X<long>::*pm1,
X<long(long)> *p2,
+#ifdef MSABI
+ long (X<long(long)>::*pm2)(long)) { // expected-note{{in instantiation of template class 'X<long (long)>' requested here}}
+#else
long (X<long(long)>::*pm2)(long)) {
+#endif
(void)(p1->*pm1);
}