mirror of
https://github.com/Stichting-MINIX-Research-Foundation/netbsd.git
synced 2025-08-13 08:00:22 -04:00
29 lines
397 B
C++
29 lines
397 B
C++
#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() {
|
|
foo(); // expected-warning{{Call virtual functions during construction or destruction will never go to a more derived class}}
|
|
}
|
|
|
|
virtual int foo();
|
|
};
|
|
}
|
|
|
|
#endif
|