[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 30 11:10:44 PDT 2024


================
@@ -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.
----------------
higher-performance wrote:

Fixed.

https://github.com/llvm/llvm-project/pull/102040


More information about the cfe-commits mailing list