[clang] Revert "Mix bits in FileID::getHashValue() (#223794)" (PR #224394)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 17 12:50:21 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Akira Hatanaka (ahatanak)
<details>
<summary>Changes</summary>
This reverts commit 9bc655d2852ec31199f2dba25d6f0749953fbe51.
It broke a couple of tests in clang/test/Analysis/html_diagnostics.
---
Full diff: https://github.com/llvm/llvm-project/pull/224394.diff
1 Files Affected:
- (modified) clang/include/clang/Basic/SourceLocation.h (+1-4)
``````````diff
diff --git a/clang/include/clang/Basic/SourceLocation.h b/clang/include/clang/Basic/SourceLocation.h
index b83ee383d45c0..b42b7e78622c6 100644
--- a/clang/include/clang/Basic/SourceLocation.h
+++ b/clang/include/clang/Basic/SourceLocation.h
@@ -53,10 +53,7 @@ class FileID {
bool operator>=(const FileID &RHS) const { return RHS <= *this; }
static FileID getSentinel() { return get(-1); }
- unsigned getHashValue() const {
- // Multiply by 37 to spread the keys to avoid clustering in DenseMap.
- return static_cast<unsigned>(ID) * 37U;
- }
+ unsigned getHashValue() const { return static_cast<unsigned>(ID); }
private:
friend class ASTWriter;
``````````
</details>
https://github.com/llvm/llvm-project/pull/224394
More information about the cfe-commits
mailing list