Update tests in preparation for using the MS ABI for Win32 targets
In preparation for making the Win32 triple imply MS ABI mode,
make all tests pass in this mode, or make them use the Itanium
mode explicitly.
Differential Revision: http://llvm-reviews.chandlerc.com/D2401
llvm-svn: 199130
diff --git a/clang/test/SemaTemplate/instantiate-complete.cpp b/clang/test/SemaTemplate/instantiate-complete.cpp
index 68d5ae3..0e169b9 100644
--- a/clang/test/SemaTemplate/instantiate-complete.cpp
+++ b/clang/test/SemaTemplate/instantiate-complete.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -cxx-abi itanium -fsyntax-only -verify %s
+// RUN: %clang_cc1 -cxx-abi microsoft -DMSABI -fsyntax-only -verify %s
// Tests various places where requiring a complete type involves
// instantiation of that type.
@@ -7,6 +8,9 @@
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_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);
}