Author: Akira Hatanaka
Date: 2026-09-17T12:50:09-07:00
New Revision: e5801a2762497161e23e978ee13fd0698ae25a2f

URL: 
https://github.com/llvm/llvm-project/commit/e5801a2762497161e23e978ee13fd0698ae25a2f
DIFF: 
https://github.com/llvm/llvm-project/commit/e5801a2762497161e23e978ee13fd0698ae25a2f.diff

LOG: Revert "Mix bits in FileID::getHashValue() (#223794)" (#224394)

This reverts commit 9bc655d2852ec31199f2dba25d6f0749953fbe51.

It broke a couple of tests in clang/test/Analysis/html_diagnostics.

Added: 
    

Modified: 
    clang/include/clang/Basic/SourceLocation.h

Removed: 
    


################################################################################
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;


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to