[cfe-commits] r51299 - in /cfe/trunk: include/clang/AST/Decl.h lib/AST/Decl.cpp

Ted Kremenek kremenek at apple.com
Sat May 24 08:11:39 PDT 2008


On May 24, 2008, at 12:27 AM, Argiris Kirtzidis wrote:

>>
>> Ted,
>>
>> The following doesn't appear to work with VC++.
>>
>> I get an error "clang::NamespaceDecl' class does not have a  
>> destructor  called ~Decl.
>>
>>> +void NamespaceDecl::Destroy(ASTContext& C) {
>>> +  // NamespaceDecl uses "NextDeclarator" to chain namespace   
>>> declarations
>>> +  // together. They are all top-level Decls.
>>> +
>>> +  this->~Decl();
>>> +  C.getAllocator().Deallocate((void *)this);
>>> +}
>>> +
>>> +
>>
>
> Should be
>
> +  this->~NamespaceDecl();

I applied Argiris' fix.

Steve: Does this fix the problem with VC++?



More information about the cfe-commits mailing list