summaryrefslogtreecommitdiff
path: root/test/SemaCXX/warn-pure-virtual-call-from-ctor-dtor.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-07-17 15:40:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-07-17 15:40:56 +0000
commit180abc3db9ae3b4fc63cd65b15697e6ffcc8a657 (patch)
tree2097d084eb235c0b12c0bff3445f4ec7bbaa8a12 /test/SemaCXX/warn-pure-virtual-call-from-ctor-dtor.cpp
parent29cafa66ad3878dbb9f82615f19fa0bded2e443c (diff)
Notes
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.cpp7
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 698eccd1d2f0..ade6198fbd0d 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(); };
+};