1 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
2
3 struct S {
SS4 S(int, int) {}
5 };
6
f(int,S const &,int)7 void f(int, S const&, int) {}
8
test1()9 void test1()
10 {
11 S X1{1, 1,};
12 S X2 = {1, 1,};
13
14 f(0, {1, 1}, 0);
15 }
16
17 namespace PR14948 {
18 template<typename T> struct Q { static T x; };
19
20 struct X {};
21 template<> X Q<X>::x {};
22 template<> int Q<int[]>::x[] { 1, 2, 3 };
23 template<> int Q<int>::x { 1 };
24
25 template<typename T> T Q<T>::x {};
26 }
27
28 int conditional1 = 1 ? {} : 0; // expected-error {{initializer list cannot be used on the right hand side of operator '?'}}
29 int conditional2 = 1 ? 0 : {}; // expected-error {{initializer list cannot be used on the right hand side of operator ':'}}
30