================ @@ -5214,9 +5215,9 @@ unsigned RecordDecl::getODRHash() { // Only calculate hash on first call of getODRHash per record. ODRHash Hash; Hash.AddRecordDecl(this); - // For RecordDecl the ODRHash is stored in the remaining 26 - // bit of RecordDeclBits, adjust the hash to accomodate. - setODRHash(Hash.CalculateHash() >> 6); + // For RecordDecl the ODRHash is stored in the remaining + // bit of RecordDeclBits, adjust the hash to accommodate. + setODRHash(Hash.CalculateHash() >> (32 - 25)); ---------------- erichkeane wrote:
I'd love it if we could put something beyond magic numbers here? Could we do a sizeof(something?) - static-constexpr in the `RecordDeclBits` for the num 25? Perhaps a `static_assert` as well to make sure the bits is always 32. https://github.com/llvm/llvm-project/pull/102040 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits