summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-static-var.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/instantiate-static-var.cpp')
-rw-r--r--test/SemaTemplate/instantiate-static-var.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-static-var.cpp b/test/SemaTemplate/instantiate-static-var.cpp
index f309f29eafab7..a7b3433b35443 100644
--- a/test/SemaTemplate/instantiate-static-var.cpp
+++ b/test/SemaTemplate/instantiate-static-var.cpp
@@ -114,3 +114,15 @@ namespace PR6449 {
template class X1<char>;
}
+
+typedef char MyString[100];
+template <typename T>
+struct StaticVarWithTypedefString {
+ static MyString str;
+};
+template <typename T>
+MyString StaticVarWithTypedefString<T>::str = "";
+
+void testStaticVarWithTypedefString() {
+ (void)StaticVarWithTypedefString<int>::str;
+}