diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-09-14 04:20:37 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-09-14 04:20:37 +0000 |
commit | dd084276526db1d53edf2b6fc8c4c8187e6ab540 (patch) | |
tree | c6d8736edc03bbab39a8f6c7a72a81596093925d /test/SemaCXX/cxx0x-initializer-constructor.cpp | |
parent | 6f85b1e7906f7a03cbede1f730ba19b28a5f85e8 (diff) |
As we do with base and member initializers in a dependent class, delay
type checking for non-static data member initializers in a dependent
class, because our ASTs lose too much information to when
type-checking an initializer. Fixes <rdar://problem/11974632>,
although the result is still rather unsatisfactory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163871 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/cxx0x-initializer-constructor.cpp')
-rw-r--r-- | test/SemaCXX/cxx0x-initializer-constructor.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx0x-initializer-constructor.cpp b/test/SemaCXX/cxx0x-initializer-constructor.cpp index 223e140ffc..a657ec81a1 100644 --- a/test/SemaCXX/cxx0x-initializer-constructor.cpp +++ b/test/SemaCXX/cxx0x-initializer-constructor.cpp @@ -304,3 +304,19 @@ namespace init_list_default { }; B b {}; // calls default constructor } + + +// <rdar://problem/11974632> +namespace rdar11974632 { + struct X { + X(const X&) = delete; + X(int); + }; + + template<typename T> + struct Y { + X x{1}; + }; + + Y<int> yi; +} |