diff options
author | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
commit | 50b73317314e889cf39c7b1d6cbf419fa7502f22 (patch) | |
tree | be1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/SemaCXX/copy-initialization.cpp | |
parent | dc04cb328508e61aad809d9b53b12f9799a00e7d (diff) | |
download | FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.zip FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.tar.gz |
Vendor import of clang trunk r154661:
http://llvm.org/svn/llvm-project/cfe/trunk@r154661
Diffstat (limited to 'test/SemaCXX/copy-initialization.cpp')
-rw-r--r-- | test/SemaCXX/copy-initialization.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/SemaCXX/copy-initialization.cpp b/test/SemaCXX/copy-initialization.cpp index fb83dcf..ea2db0c 100644 --- a/test/SemaCXX/copy-initialization.cpp +++ b/test/SemaCXX/copy-initialization.cpp @@ -42,3 +42,26 @@ namespace PR6757 { f(foo); } } + +namespace DR5 { + // Core issue 5: if a temporary is created in copy-initialization, it is of + // the cv-unqualified version of the destination type. + namespace Ex1 { + struct C { }; + C c; + struct A { + A(const A&); + A(const C&); + }; + const volatile A a = c; // ok + } + + namespace Ex2 { + struct S { + S(S&&); // expected-warning {{C++11}} + S(int); + }; + const S a(0); + const S b = 0; + } +} |