blob: 9f7094dc63e9130360f2db21d9acdbe352f3ed92 [file] [log] [blame]
Jordan Rose4eff6b52012-10-10 17:55:40 +00001#ifdef AS_SYSTEM
2#pragma clang system_header
3
4namespace system {
5 class A {
6 public:
7 A() {
8 foo(); // no-warning
9 }
10
11 virtual int foo();
12 };
13}
14
15#else
16
17namespace header {
18 class A {
19 public:
20 A() {
21 foo(); // expected-warning{{Call virtual functions during construction or destruction will never go to a more derived class}}
22 }
23
24 virtual int foo();
25 };
26}
27
28#endif