23 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s2 3struct A {4private: 5 int : 0;6};7 8A a = { };9A a2 = { 1 }; // expected-error{{excess elements in struct initializer}}10 11struct B {12 const int : 0; // expected-error{{anonymous bit-field cannot have qualifiers}}13};14 15B b;16 17void testB() {18 B b2(b);19 B b3(static_cast<B&&>(b2));20 b = b;21 b = static_cast<B&&>(b);22}23