summaryrefslogtreecommitdiff
path: root/test/SemaTemplate
diff options
context:
space:
mode:
authorWill Wilson <will@indefiant.com>2014-05-09 09:52:13 +0000
committerWill Wilson <will@indefiant.com>2014-05-09 09:52:13 +0000
commit09a6d705045fd9df06c9d36076c526c92da31eec (patch)
tree5b72f9cc77e278c3c78b1a3fbd61a5ab385ccc04 /test/SemaTemplate
parenta26ce2a9d01bd285054c7890c22e4bf4074c5a40 (diff)
downloadclang-09a6d705045fd9df06c9d36076c526c92da31eec.tar.gz
Permit duplicate explicit class instantiations if MSVCCompat is enabled
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208402 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate')
-rw-r--r--test/SemaTemplate/ms-class-specialization-duplicate.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaTemplate/ms-class-specialization-duplicate.cpp b/test/SemaTemplate/ms-class-specialization-duplicate.cpp
new file mode 100644
index 0000000000..183fdfc9bf
--- /dev/null
+++ b/test/SemaTemplate/ms-class-specialization-duplicate.cpp
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -fms-compatibility -fdelayed-template-parsing -fsyntax-only -verify %s
+
+template <typename T>
+class A {
+};
+typedef int TInt;
+
+template class A<int>; // expected-note {{previous explicit instantiation is here}}
+template class A<TInt>; // expected-warning {{duplicate explicit instantiation of 'A<int>' ignored as a Microsoft extension}}