summaryrefslogtreecommitdiff
path: root/test/SemaCXX/cxx0x-class.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-14 15:38:35 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-14 15:38:35 +0000
commitd2e0a8dd949ab874c6d66f97106bd5c270e2fa7d (patch)
treee8a99a0386e8f6bece630700da5915c8a312c2d9 /test/SemaCXX/cxx0x-class.cpp
parentfdc82ccb3f2b23a89e7002fe8238e1422b00f96a (diff)
Diffstat (limited to 'test/SemaCXX/cxx0x-class.cpp')
-rw-r--r--test/SemaCXX/cxx0x-class.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx0x-class.cpp b/test/SemaCXX/cxx0x-class.cpp
index 2b1338f97fd7..8afb0fd6f3c0 100644
--- a/test/SemaCXX/cxx0x-class.cpp
+++ b/test/SemaCXX/cxx0x-class.cpp
@@ -37,3 +37,11 @@ namespace Foo {
int y = x;
};
}
+
+// Instantiating another default member initializer while parsing one should
+// not cause us to mess up the 'this' override.
+template<typename> struct DefaultMemberTemplate { int n = 0; };
+class DefaultMemberInitSelf {
+ DefaultMemberTemplate<int> t = {};
+ int *p = &t.n;
+};