Skip to content

Commit 4a73c99

Browse files
authored
[clang][Modules] Fix the Size of RecordDecl's BitCodeAbbrevOp (#133500)
https://github.com/llvm/llvm-project/pull/102040/files#diff-125f472e690aa3d973bc42aa3c5d580226c5c47661551aca2889f960681aa64dR2477 added 1 bit to `RecordDecl`'s serialization format, but did not increment its abbreviation size. This can lead to rare cases where a record may overflow if the `RecordDecl`'s `getArgPassingRestrictions()` returns something bigger than 1 (see [here](https://github.com/llvm/llvm-project/blob/b3f01a6aa45b00240cec1c64286b85d7ba87e2af/clang/lib/Serialization/ASTWriterDecl.cpp#L688)). rdar://143763558
1 parent 23fb048 commit 4a73c99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Serialization/ASTWriterDecl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2579,7 +2579,7 @@ void ASTWriter::WriteDeclAbbrevs() {
25792579
// RecordDecl
25802580
Abv->Add(BitCodeAbbrevOp(
25812581
BitCodeAbbrevOp::Fixed,
2582-
13)); // Packed Record Decl Bits: FlexibleArrayMember,
2582+
14)); // Packed Record Decl Bits: FlexibleArrayMember,
25832583
// AnonymousStructUnion, hasObjectMember, hasVolatileMember,
25842584
// isNonTrivialToPrimitiveDefaultInitialize,
25852585
// isNonTrivialToPrimitiveCopy, isNonTrivialToPrimitiveDestroy,

0 commit comments

Comments
 (0)