aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/undefined-internal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/undefined-internal.cpp')
-rw-r--r--test/SemaCXX/undefined-internal.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/SemaCXX/undefined-internal.cpp b/test/SemaCXX/undefined-internal.cpp
index bb87ce0f12..a7e9249965 100644
--- a/test/SemaCXX/undefined-internal.cpp
+++ b/test/SemaCXX/undefined-internal.cpp
@@ -84,3 +84,24 @@ namespace test5 {
B<A>::foo(); // expected-note {{used here}}
}
}
+
+namespace test6 {
+ template <class T> struct A {
+ static const int zero = 0;
+ static const int one = 1;
+ static const int two = 2;
+
+ int value;
+
+ A() : value(zero) {
+ value = one;
+ }
+ };
+
+ namespace { struct Internal; }
+
+ void test() {
+ A<Internal> a;
+ a.value = A<Internal>::two;
+ }
+}