Vassil Vassilev | 2 Feb 2011 10:02
Picon
Picon

Re: No virtual destructor in ExternalSemaSource

On 02/01/2011 09:01 PM, John McCall wrote:
> On Feb 1, 2011, at 3:35 AM, Vassil Vassilev wrote:
>>    I found out that there is no virtual destructor for ExternalSemaSource:
>>      include/clang/Sema/ExternalSemaSource.h:33:  ~ExternalSemaSource();
>>      include/clang/AST/ExternalASTSource.h:56:  virtual
>> ~ExternalASTSource();
>>
>>    Is that bug or I am misunderstanding something? Shall we (Axel
>> Naumann and me) check in patch.
> Methods with the same signature as virtual methods in a base class are
> implicitly virtual, and this applies to destructors, too.
>
> John.
Oh crap... I forgot that ExternalSemaSource derives from ExternalASTSource.
Vassil

Gmane