summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX
diff options
context:
space:
mode:
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