diff options
Diffstat (limited to 'test/SemaCXX/warn-pure-virtual-call-from-ctor-dtor.cpp')
-rw-r--r-- | test/SemaCXX/warn-pure-virtual-call-from-ctor-dtor.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-pure-virtual-call-from-ctor-dtor.cpp b/test/SemaCXX/warn-pure-virtual-call-from-ctor-dtor.cpp index 698eccd..ade6198 100644 --- a/test/SemaCXX/warn-pure-virtual-call-from-ctor-dtor.cpp +++ b/test/SemaCXX/warn-pure-virtual-call-from-ctor-dtor.cpp @@ -5,3 +5,10 @@ struct A { virtual void f() = 0; // expected-note 2 {{'f' declared here}} }; + +// Don't warn (or note) when calling the function on a pointer. (PR10195) +struct B { + A *a; + B() { a->f(); }; + ~B() { a->f(); }; +}; |