Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Parser / cxx-default-delete.cpp
blob6c74937504b0cb44a44bc5018dfd1e0a4dedeb3a
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
3 int i = delete; // expected-error{{only functions}}
4 int j = default; // expected-error{{special member functions}}
6 int f() = delete, g; // expected-error{{'= delete' is a function definition}}
7 int o, p() = delete; // expected-error{{'= delete' is a function definition}}
9 int q() = default, r; // expected-error{{only special member functions}} \
10 // expected-error{{'= default' is a function definition}}
11 int s, t() = default; // expected-error{{'= default' is a function definition}}
13 struct foo {
14 foo() = default;
15 ~foo() = delete;
16 void bar() = delete;
19 void baz() = delete;
21 struct quux {
22 int quux() = default; // expected-error{{constructor cannot have a return type}}
25 struct attrs {
26 [[noreturn]] friend void deleted_with_attrs() = delete;