On Wed, Nov 12, 2008 at 5:58 PM, Sebastian Redl
<[EMAIL PROTECTED]> wrote:
> Douglas Gregor wrote:
>>
>> Author: dgregor
>> Date: Wed Nov 12 15:52:20 2008
>> New Revision: 59173
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=59173&view=rev
>> Log:
>> Slightly improve type hash
>>       static unsigned getHashValue(clang::QualType Val) {
>> -      return (unsigned)Val.getAsOpaquePtr();
>> +      return (unsigned)Val.getAsOpaquePtr() ^
>> +             ((unsigned)Val.getAsOpaquePtr() >> 9);
>>     }
>>
>
> This was already broken before this commit, but I'll mention it here: you
> can't cast a pointer to unsigned; it fails to compile on 64-bit systems such
> as mine. You must first cast to some integer type of sufficient size (e.g.
> size_t).

*Sigh*, sorry; someone else pointed this out earlier and I convinced
myself it wasn't an issue. Fixed now.

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

Reply via email to