On Feb 11, 2009, at 10:10 AM, Chris Lattner wrote:
> On Feb 11, 2009, at 8:47 AM, Douglas Gregor wrote:
>> URL: http://llvm.org/viewvc/llvm-project?rev=64307&view=rev
>> Log:
>> Rename Sema::hasSameType to QualType::isSameAs
>> Rename Sema::hasSameUnqualifiedType to
>> QualType::isSameIgnoringQalifiers
>
> Hey Doug, sorry to keep bugging you about this.
>
>> +/// \brief Determine whether this type and Other represent the
>> same type.
>> +inline bool QualType::isSameAs(QualType Other) const {
>> + return getTypePtr()->getCanonicalTypeInternal() ==
>> + Other.getTypePtr()->getCanonicalTypeInternal();
>> +}
>
> I don't think this is safe. If "this" is 'const on "int[4]"' and
> Other is "(const int)[4]", this will return false. You need to use
> the ASTContext version of getCanonicalType to handle this.
Ah, arrays. How strange they are. I've moved the functionality to
ASTContext.
- Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits