summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-02-14 12:18:48 +0000
committerdim <dim@FreeBSD.org>2015-02-14 12:18:48 +0000
commitff28d95d1f024411955913aaa68c17f2b09c46fd (patch)
treedfd4e4f0fa9ce6e010e098662d5f00a37c9ff0e3 /test/SemaCXX
parentcf8e1ca250cdf4ade1e7d628e56040eb27797b5d (diff)
downloadFreeBSD-src-ff28d95d1f024411955913aaa68c17f2b09c46fd.zip
FreeBSD-src-ff28d95d1f024411955913aaa68c17f2b09c46fd.tar.gz
Vendor import of clang RELEASE_360/rc3 tag r229040 (effectively, 3.6.0 RC3):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc3@229040
Diffstat (limited to 'test/SemaCXX')
-rw-r--r--test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp1
-rw-r--r--test/SemaCXX/lambda-expressions.cpp9
2 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp b/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
index 70f7c64..2405d2a 100644
--- a/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
+++ b/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
@@ -117,6 +117,7 @@ void argument_deduction() {
void auto_deduction() {
auto l = {1, 2, 3, 4};
+ auto l2 {1, 2, 3, 4}; // expected-warning {{will change meaning in a future version of Clang}}
static_assert(same_type<decltype(l), std::initializer_list<int>>::value, "");
auto bl = {1, 2.0}; // expected-error {{cannot deduce}}
diff --git a/test/SemaCXX/lambda-expressions.cpp b/test/SemaCXX/lambda-expressions.cpp
index cad322a..7911c1b 100644
--- a/test/SemaCXX/lambda-expressions.cpp
+++ b/test/SemaCXX/lambda-expressions.cpp
@@ -437,3 +437,12 @@ namespace error_in_transform_prototype {
f(S()); // expected-note {{requested here}}
}
}
+
+namespace PR21857 {
+ template<typename Fn> struct fun : Fn {
+ fun() = default;
+ using Fn::operator();
+ };
+ template<typename Fn> fun<Fn> wrap(Fn fn);
+ auto x = wrap([](){});
+}
OpenPOWER on IntegriCloud