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

Argiris Kirtzidis akyrtzi at gmail.com
Sat May 24 00:27:28 PDT 2008


>
> Ted,
>
> The following doesn't appear to work with VC++.
>
> I get an error "clang::NamespaceDecl' class does not have a destructor  
> called ~Decl.
>
> Thoughts?
>
> snaroff
>
>   
>> +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();


-Argiris




More information about the cfe-commits mailing list