summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp8
-rw-r--r--clang/test/SemaCXX/generalized-initializers.cpp12
2 files changed, 8 insertions, 12 deletions
diff --git a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
index a08a04806ca..47ceaf0b83c 100644
--- a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
+++ b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
@@ -109,3 +109,11 @@ void argument_deduction() {
deduce_ref({1, 2.0}); // expected-error {{no matching function}}
}
+
+void auto_deduction() {
+ auto l = {1, 2, 3, 4};
+ static_assert(same_type<decltype(l), std::initializer_list<int>>::value, "");
+ auto bl = {1, 2.0}; // expected-error {{cannot deduce}}
+
+ for (int i : {1, 2, 3, 4}) {}
+}
diff --git a/clang/test/SemaCXX/generalized-initializers.cpp b/clang/test/SemaCXX/generalized-initializers.cpp
index 2e7df9aeafe..d696650e3eb 100644
--- a/clang/test/SemaCXX/generalized-initializers.cpp
+++ b/clang/test/SemaCXX/generalized-initializers.cpp
@@ -38,18 +38,6 @@ namespace std {
};
}
-namespace integral {
-
- void initializer_list() {
- auto l = {1, 2, 3, 4};
- static_assert(same_type<decltype(l), std::initializer_list<int>>::value, "");
- auto bl = {1, 2.0}; // expected-error {{cannot deduce}}
-
- for (int i : {1, 2, 3, 4}) {}
- }
-
-}
-
namespace objects {
struct X1 { X1(int); };
OpenPOWER on IntegriCloud