diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-02-19 19:14:36 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-02-19 19:14:36 +0000 |
commit | 0cf82f6ad04d96ee795d8e829320daaf32581549 (patch) | |
tree | b97cb5629fa693018a167acbc165602eb1a53e59 /clang/test/SemaCXX/destructor.cpp | |
parent | f05c0958e281e89ed1d8cc0752a5878ac9d8ed66 (diff) | |
download | bcm5719-llvm-0cf82f6ad04d96ee795d8e829320daaf32581549.tar.gz bcm5719-llvm-0cf82f6ad04d96ee795d8e829320daaf32581549.zip |
Teach the virtual-functions-without-virtual-destructor warning to only
warn about polymorphic classes (which have virtual functions) rather
than dynamic classes (which are polymorphic or have virtual bases).
llvm-svn: 126036
Diffstat (limited to 'clang/test/SemaCXX/destructor.cpp')
-rw-r--r-- | clang/test/SemaCXX/destructor.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/destructor.cpp b/clang/test/SemaCXX/destructor.cpp index ec437f7101e..14a4fb891cd 100644 --- a/clang/test/SemaCXX/destructor.cpp +++ b/clang/test/SemaCXX/destructor.cpp @@ -172,3 +172,8 @@ template<class T> class TS2 { // expected-warning {{'nonvirtualdtor::TS2<int>' h TS2<int> foo; // expected-note {{instantiation}} } + +namespace PR9238 { + class B { public: ~B(); }; + class C : virtual B { public: ~C() { } }; +} |