Skip to content

Conversation

@vitalybuka
Copy link
Collaborator

Reverts #155826

To simplify revert of #155549 which introduces UBs.

@vitalybuka vitalybuka added the skip-precommit-approval PR for CI feedback, not intended for review label Aug 28, 2025
@llvmbot
Copy link
Member

llvmbot commented Aug 28, 2025

@llvm/pr-subscribers-llvm-adt

Author: Vitaly Buka (vitalybuka)

Changes

Reverts llvm/llvm-project#155826

To simplify revert of #155549 which introduces UBs.


Full diff: https://github.com/llvm/llvm-project/pull/155875.diff

1 Files Affected:

  • (modified) llvm/include/llvm/ADT/DenseMapInfo.h (+1-2)
diff --git a/llvm/include/llvm/ADT/DenseMapInfo.h b/llvm/include/llvm/ADT/DenseMapInfo.h
index ec7a116856bb4..930bd4baca31d 100644
--- a/llvm/include/llvm/ADT/DenseMapInfo.h
+++ b/llvm/include/llvm/ADT/DenseMapInfo.h
@@ -124,8 +124,7 @@ struct DenseMapInfo<
     if constexpr (std::is_unsigned_v<T> && sizeof(T) > sizeof(unsigned))
       return densemap::detail::mix(Val);
     else
-      return static_cast<unsigned>(Val *
-                                   static_cast<std::make_unsigned_t<T>>(37U));
+      return static_cast<unsigned>(Val * 37U);
   }
 
   static bool isEqual(const T &LHS, const T &RHS) { return LHS == RHS; }

@vitalybuka
Copy link
Collaborator Author

Looks like there is other unrelated overlapping issue on the bot. The fix seems works.

@vitalybuka vitalybuka closed this Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llvm:adt skip-precommit-approval PR for CI feedback, not intended for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants