minix/external/bsd/llvm/dist/clang/test/Analysis/virtualcall.h
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

28 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