1#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 29