[cfe-commits] r72591 - in /cfe/trunk: include/clang/AST/DeclCXX.h lib/AST/DeclCXX.cpp lib/CodeGen/CGCXX.cpp lib/CodeGen/CodeGenFunction.h lib/CodeGen/CodeGenModule.cpp

Anders Carlsson andersca at mac.com
Sat May 30 13:04:53 PDT 2009


On May 30, 2009, at 1:01 PM, Douglas Gregor wrote:

>
> On May 30, 2009, at 10:32 AM, Anders Carlsson <andersca at mac.com>  
> wrote:
>
>>
>> 29 maj 2009 kl. 23.01 skrev Douglas Gregor:
>>
>>>
>>> On May 29, 2009, at 2:03 PM, Anders Carlsson wrote:
>>>> +const CXXDestructorDecl *
>>>> +CXXRecordDecl::getDestructor(ASTContext &Context) {
>>>> +  QualType ClassType = Context.getTypeDeclType(this);
>>>
>>> You should grab the canonical type here (ClassType =  
>>> Context.getCanonicalType(ClassType)), lest our search for a  
>>> destructor fail.
>>>
>>
>> Hmm, can you ever end up with a non-canonical type when calling  
>> getTypeDeclType?
>
> Yes, when the Decl is a class template specialization, because we  
> keep some extra sugar for them.
>

Ah!

Looks like

bool CXXRecordDecl::hasConstCopyConstructor(ASTContext &Context) const {

has the same problem. Will fix!

Anders




More information about the cfe-commits mailing list