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 | 6d149412c8619c83e4ab7de0dbd836d251b015ad (patch) | |
tree | f55fa93368d262e1716d3c30197ec291bca6f6f9 /clang/test/SemaCXX/cxx0x-initializer-constructor.cpp | |
parent | 1ec4a5e190e97d41bdaa70a5f0cb3e50fa60a821 (diff) | |
download | bcm5719-llvm-6d149412c8619c83e4ab7de0dbd836d251b015ad.tar.gz bcm5719-llvm-6d149412c8619c83e4ab7de0dbd836d251b015ad.zip |
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.
llvm-svn: 163871
Diffstat (limited to 'clang/test/SemaCXX/cxx0x-initializer-constructor.cpp')
-rw-r--r-- | clang/test/SemaCXX/cxx0x-initializer-constructor.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp b/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp index 223e140ffc0..a657ec81a14 100644 --- a/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp +++ b/clang/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; +} |