summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/destructor.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-12-16 20:07:24 +0000
committerNico Weber <nicolasweber@gmx.de>2015-12-16 20:07:24 +0000
commit2381df7b54cdb387779cb219d4c9f43d046b25bf (patch)
treeaa6f345f2d42541150c3df2cf4637778e6be3d21 /clang/test/SemaCXX/destructor.cpp
parent4f9164d9b325eb33f8f93aba9578a409c66e4fcc (diff)
downloadbcm5719-llvm-2381df7b54cdb387779cb219d4c9f43d046b25bf.tar.gz
bcm5719-llvm-2381df7b54cdb387779cb219d4c9f43d046b25bf.zip
Let -Wdelete-non-virtual-dtor mention final.
llvm-svn: 255812
Diffstat (limited to 'clang/test/SemaCXX/destructor.cpp')
-rw-r--r--clang/test/SemaCXX/destructor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/SemaCXX/destructor.cpp b/clang/test/SemaCXX/destructor.cpp
index 60cb0ef0908..e7323f90b3f 100644
--- a/clang/test/SemaCXX/destructor.cpp
+++ b/clang/test/SemaCXX/destructor.cpp
@@ -217,8 +217,8 @@ class simple_ptr {
public:
simple_ptr(T* t): _ptr(t) {}
~simple_ptr() { delete _ptr; } // \
- // expected-warning {{delete called on 'dnvd::B' that has virtual functions but non-virtual destructor}} \
- // expected-warning {{delete called on 'dnvd::D' that has virtual functions but non-virtual destructor}}
+ // expected-warning {{delete called on non-final 'dnvd::B' that has virtual functions but non-virtual destructor}} \
+ // expected-warning {{delete called on non-final 'dnvd::D' that has virtual functions but non-virtual destructor}}
T& operator*() const { return *_ptr; }
private:
T* _ptr;
@@ -228,7 +228,7 @@ template <typename T>
class simple_ptr2 {
public:
simple_ptr2(T* t): _ptr(t) {}
- ~simple_ptr2() { delete _ptr; } // expected-warning {{delete called on 'dnvd::B' that has virtual functions but non-virtual destructor}}
+ ~simple_ptr2() { delete _ptr; } // expected-warning {{delete called on non-final 'dnvd::B' that has virtual functions but non-virtual destructor}}
T& operator*() const { return *_ptr; }
private:
T* _ptr;
@@ -314,15 +314,15 @@ void nowarn0() {
void warn0() {
{
B* b = new B();
- delete b; // expected-warning {{delete called on 'dnvd::B' that has virtual functions but non-virtual destructor}}
+ delete b; // expected-warning {{delete called on non-final 'dnvd::B' that has virtual functions but non-virtual destructor}}
}
{
B* b = new D();
- delete b; // expected-warning {{delete called on 'dnvd::B' that has virtual functions but non-virtual destructor}}
+ delete b; // expected-warning {{delete called on non-final 'dnvd::B' that has virtual functions but non-virtual destructor}}
}
{
D* d = new D();
- delete d; // expected-warning {{delete called on 'dnvd::D' that has virtual functions but non-virtual destructor}}
+ delete d; // expected-warning {{delete called on non-final 'dnvd::D' that has virtual functions but non-virtual destructor}}
}
}
OpenPOWER on IntegriCloud