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).

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

Reply via email to