[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 30 10:29:09 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.
----------------
erichkeane wrote:
```suggestion
// bits of RecordDeclBits, adjust the hash to accommodate.
```
https://github.com/llvm/llvm-project/pull/102040
More information about the cfe-commits
mailing list