[cfe-commits] r124582 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDeclCXX.cpp test/SemaCXX/destructor.cpp
Argyrios Kyrtzidis
kyrtzidis at apple.com
Mon Jan 31 09:16:17 PST 2011
On Jan 31, 2011, at 2:11 AM, Benjamin Kramer wrote:
>
> 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.
Committed in r124585, thanks for letting me know!
>
> 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