1 // RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
2 // RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
3 // RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
4 // RUN: %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
7 __extension__ typedef __SIZE_TYPE__ size_t;
9 template<typename T> struct initializer_list {
11 initializer_list(const T *p, size_t n);
15 namespace dr1048 { // dr1048: 3.6
20 #if __cplusplus >= 201103L
21 // ok: we deduce non-const A in each case.
23 while (1) switch (n) {
33 namespace dr1054 { // dr1054: no
34 // FIXME: Test is incomplete.
35 struct A {} volatile a;
37 // FIXME: This is wrong: an lvalue-to-rvalue conversion is applied here,
38 // which copy-initializes a temporary from 'a'. Therefore this is
39 // ill-formed because A does not have a volatile copy constructor.
40 // (We might want to track this aspect under dr1383 instead?)
41 a; // expected-warning {{assign into a variable to force a volatile load}}
45 namespace dr1070 { // dr1070: 3.5
46 #if __cplusplus >= 201103L
48 A(std::initializer_list<int>);
56 std::initializer_list<int> a;
58 std::initializer_list<double> c;