[cfe-commits] r124582 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDeclCXX.cpp test/SemaCXX/destructor.cpp
Benjamin Kramer
benny.kra at googlemail.com
Mon Jan 31 02:11:58 PST 2011
On 31.01.2011, at 08:05, Argyrios Kyrtzidis wrote:
> Author: akirtzidis
> Date: Mon Jan 31 01:05:00 2011
> New Revision: 124582
>
> URL: http://llvm.org/viewvc/llvm-project?rev=124582&view=rev
> Log:
> Warn if the class has virtual methods but non-virtual destructor. Addresses rdar://8756445.
Nice!
We shouldn't warn on protected destructors though, it's a common pattern to disallow polymorphic deletion. GCC used to warn on this too, but the bug was fixed in GCC 4.3.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302
http://www.gotw.ca/publications/mill18.htm
More information about the cfe-commits
mailing list