llvm-project/clang/test/SemaCXX/warn-pure-virtual-kext.cpp
Davide Italiano ccb3738527 [Sema] Don't emit "pure virtual" warning for fully qualified calls.
-fapple-kext is an exception because calls will still go through
the vtable in that mode. Add a note to make the user aware of that.

PR:   23215
Differential Revision:  http://reviews.llvm.org/D10935

llvm-svn: 242246
2015-07-14 23:36:10 +00:00

9 lines
437 B
C++

// RUN: %clang_cc1 %s -fapple-kext -fsyntax-only -verify
struct A {
virtual void f() = 0; // expected-note {{'f' declared here}}
A() {
A::f(); // expected-warning {{call to pure virtual member function 'f' has undefined behavior; overrides of 'f' in subclasses are not available in the constructor of 'A'}} // expected-note {{qualified call to 'A'::'f' is treated as a virtual call to 'f' due to -fapple-kext}}
}
};