summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/extern-templates.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/extern-templates.cpp')
-rw-r--r--test/SemaTemplate/extern-templates.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/SemaTemplate/extern-templates.cpp b/test/SemaTemplate/extern-templates.cpp
index eca64ed595eb..5eb9c9db127c 100644
--- a/test/SemaTemplate/extern-templates.cpp
+++ b/test/SemaTemplate/extern-templates.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple i686-pc-win32 -fsyntax-only -verify %s -DMS
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu-pc-win32 -fsyntax-only -verify %s
template<typename T>
class X0 {
@@ -21,12 +22,20 @@ extern template class X0<int*>;
template<typename T>
void X0<T>::Inner::g(T t) {
- t = 17; // expected-error{{incompatible}}
+#ifdef MS
+ t = 17; // expected-error{{assigning to 'long *' from incompatible}} expected-error{{assigning to 'int *' from incompatible}}
+#else
+ t = 17; // expected-error{{assigning to 'long *' from incompatible}}
+#endif
}
void test_intptr(X0<int*> xi, X0<int*>::Inner xii) {
xi.f(0);
+#ifdef MS
+ xii.g(0); // expected-note {{instantiation}}
+#else
xii.g(0);
+#endif
}
extern template class X0<long*>;