2012-10-11 01:55:40 +08:00
|
|
|
#ifdef AS_SYSTEM
|
|
|
|
#pragma clang system_header
|
|
|
|
|
|
|
|
namespace system {
|
|
|
|
class A {
|
|
|
|
public:
|
|
|
|
A() {
|
|
|
|
foo(); // no-warning
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual int foo();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
namespace header {
|
|
|
|
class A {
|
|
|
|
public:
|
|
|
|
A() {
|
2016-12-10 09:16:09 +08:00
|
|
|
foo();
|
|
|
|
#if !PUREONLY
|
|
|
|
#if INTERPROCEDURAL
|
|
|
|
// expected-warning-re@-3 {{{{^}}Call Path : fooCall to virtual function during construction will not dispatch to derived class}}
|
|
|
|
#else
|
|
|
|
// expected-warning-re@-5 {{{{^}}Call to virtual function during construction will not dispatch to derived class}}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2012-10-11 01:55:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual int foo();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|