On Oct 7, 2009, at 9:37 AM, Fariborz Jahanian wrote:

>
> On Oct 7, 2009, at 9:01 AM, Douglas Gregor wrote:
>
>>
>> On Oct 6, 2009, at 4:08 PM, Fariborz Jahanian wrote:
>>>
>>> +          unsigned CV1 = (*Ptr).getCVRQualifiers();
>>> +          unsigned CV2 = T.getCVRQualifiers();
>>
>> For both CV1 and CV2, we should get the canonical type (of *Ptr and  
>> T) before getting the CV qualifiers. Otherwise, we won't see  
>> qualifiers applied within a typedef.
>
> I think because of the following canonicalization is already done  
> for us.
>
> void
> BuiltinCandidateTypeSet::AddTypesConvertedFrom(QualType Ty,
>                                               bool  
> AllowUserConversions,
>                                               bool  
> AllowExplicitConversions) {
>  // Only deal with canonical types.
>  Ty = Context.getCanonicalType(Ty);
>  ...

Ah, right! In that case, we don't need

   C1 = Context.getCanonicalType(C1).getUnqualifiedType();

or

   C2 = Context.getCanonicalType(C2).getUnqualifiedType();

to call getCanonicalType().

        - Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to