diff options
Diffstat (limited to 'test/SemaCXX/cxx0x-class.cpp')
-rw-r--r-- | test/SemaCXX/cxx0x-class.cpp | 8 |
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; +}; |