Mercurial > hg > CbC > CbC_llvm
view clang/test/SemaCXX/warn-suggest-destructor-override @ 222:81f6424ef0e3 llvm-original
LLVM original branch
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 18 Jul 2021 22:10:01 +0900 |
parents | 79ff65ed7e25 |
children |
line wrap: on
line source
// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify -Wsuggest-destructor-override struct A { ~A(); virtual void run(); }; struct B : public A { ~B(); }; struct C { virtual void run(); virtual ~C(); // expected-note 2{{overridden virtual function is here}} }; struct D : public C { void run(); ~D(); // expected-warning@-1 {{'~D' overrides a destructor but is not marked 'override'}} }; struct E : public C { void run(); virtual ~E(); // expected-warning@-1 {{'~E' overrides a destructor but is not marked 'override'}} };