diff options
Diffstat (limited to 'clang/test/AST/Interp/constexpr-subobj-initialization.cpp')
| -rw-r--r-- | clang/test/AST/Interp/constexpr-subobj-initialization.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/clang/test/AST/Interp/constexpr-subobj-initialization.cpp b/clang/test/AST/Interp/constexpr-subobj-initialization.cpp index 4976b165468b..1a3599494419 100644 --- a/clang/test/AST/Interp/constexpr-subobj-initialization.cpp +++ b/clang/test/AST/Interp/constexpr-subobj-initialization.cpp @@ -5,8 +5,6 @@ /// Differences: /// 1) The type of the uninitialized base class is printed WITH the namespace, /// i.e. 'baseclass_uninit::DelBase' instead of just 'DelBase'. -/// 2) The location is not the base specifier declaration, but the call site -/// of the constructor. namespace baseclass_uninit { @@ -14,33 +12,29 @@ struct DelBase { constexpr DelBase() = delete; // expected-note {{'DelBase' has been explicitly marked deleted here}} }; -struct Foo : DelBase { +struct Foo : DelBase { // expected-note 2{{constructor of base class 'baseclass_uninit::DelBase' is not called}} constexpr Foo() {}; // expected-error {{call to deleted constructor of 'DelBase'}} }; -constexpr Foo f; // expected-error {{must be initialized by a constant expression}} \ - // expected-note {{constructor of base class 'baseclass_uninit::DelBase' is not called}} +constexpr Foo f; // expected-error {{must be initialized by a constant expression}} struct Bar : Foo { constexpr Bar() {}; }; -constexpr Bar bar; // expected-error {{must be initialized by a constant expression}} \ - // expected-note {{constructor of base class 'baseclass_uninit::DelBase' is not called}} +constexpr Bar bar; // expected-error {{must be initialized by a constant expression}} struct Base {}; -struct A : Base { +struct A : Base { // expected-note {{constructor of base class 'baseclass_uninit::Base' is not called}} constexpr A() : value() {} // expected-error {{member initializer 'value' does not name a non-static data member or base class}} }; -constexpr A a; // expected-error {{must be initialized by a constant expression}} \ - // expected-note {{constructor of base class 'baseclass_uninit::Base' is not called}} +constexpr A a; // expected-error {{must be initialized by a constant expression}} -struct B : Base { +struct B : Base { // expected-note {{constructor of base class 'baseclass_uninit::Base' is not called}} constexpr B() : {} // expected-error {{expected class member or base class name}} }; -constexpr B b; // expected-error {{must be initialized by a constant expression}} \ - // expected-note {{constructor of base class 'baseclass_uninit::Base' is not called}} +constexpr B b; // expected-error {{must be initialized by a constant expression}} } // namespace baseclass_uninit |
