[OpenACC] Implement 'collapse' for combined constructs.
[llvm-project.git] / clang / test / CXX / dcl.decl / dcl.init / p14-0x.cpp
blobe7f501352168ceb553efbe44a96467032e3aedd6
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
3 struct NoDefault {
4 NoDefault() = delete; // expected-note {{here}}
5 NoDefault(int);
6 };
7 struct Explicit { // expected-note 2 {{candidate}} expected-note {{here}}
8 explicit Explicit(int); // expected-note {{not a candidate}}
9 };
10 struct NoCopy {
11 NoCopy();
12 NoCopy(const NoCopy &) = delete; // expected-note {{here}}
14 struct NoMove {
15 NoMove();
16 NoMove(NoMove &&) = delete; // expected-note {{here}}
18 class Private {
19 Private(int); // expected-note {{here}}
20 public:
21 Private();
23 class Friend {
24 friend class S;
25 Friend(int);
29 class S {
30 NoDefault nd1;
31 NoDefault nd2 = 42;
32 Explicit e1; // expected-note {{here}}
33 Explicit e2 = 42; // expected-error {{no viable conversion}}
34 NoCopy nc = NoCopy(); // expected-error {{call to deleted}}
35 NoMove nm = NoMove(); // expected-error {{call to deleted}}
36 Private p = 42; // expected-error {{private constructor}}
37 Friend f = 42;
39 S() {} // expected-error {{call to deleted constructor of 'NoDefault'}} \
40 expected-error {{must explicitly initialize the member 'e1' which does not have a default constructor}}
41 S(int) : nd1(42), e1(42) {}
44 // FIXME: test the other forms which use copy-initialization