2012-10-11 01:55:40 +08:00
|
|
|
namespace header {
|
2017-08-28 16:44:43 +08:00
|
|
|
class Z {
|
2012-10-11 01:55:40 +08:00
|
|
|
public:
|
2017-08-28 16:44:43 +08:00
|
|
|
Z() {
|
2016-12-10 09:16:09 +08:00
|
|
|
foo();
|
|
|
|
#if !PUREONLY
|
2017-08-28 16:44:43 +08:00
|
|
|
// expected-warning-re@-2 {{{{^}}Call to virtual function during construction}}
|
|
|
|
// expected-note-re@-3 {{{{^}}This constructor of an object of type 'Z' has not returned when the virtual method was called}}
|
|
|
|
// expected-note-re@-4 {{{{^}}Call to virtual function during construction}}
|
2016-12-10 09:16:09 +08:00
|
|
|
#endif
|
2012-10-11 01:55:40 +08:00
|
|
|
}
|
|
|
|
virtual int foo();
|
|
|
|
};
|
|
|
|
}
|