Skip to content

Commit 30ea0f0

Browse files
committedDec 11, 2024·
[NFC] [clang] [Serialization] Fix warning for narrowing cast
1 parent bc7449c commit 30ea0f0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎clang/lib/Serialization/ASTWriter.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -4328,8 +4328,8 @@ uint64_t ASTWriter::WriteSpecializationInfoLookupTable(
43284328
IsPartial);
43294329

43304330
uint64_t Offset = Stream.GetCurrentBitNo();
4331-
RecordData::value_type Record[] = {IsPartial ? DECL_PARTIAL_SPECIALIZATIONS
4332-
: DECL_SPECIALIZATIONS};
4331+
RecordData::value_type Record[] = {static_cast<RecordData::value_type>(
4332+
IsPartial ? DECL_PARTIAL_SPECIALIZATIONS : DECL_SPECIALIZATIONS)};
43334333
Stream.EmitRecordWithBlob(IsPartial ? DeclPartialSpecializationsAbbrev
43344334
: DeclSpecializationsAbbrev,
43354335
Record, LookupTable);
@@ -6065,7 +6065,9 @@ void ASTWriter::WriteSpecializationsUpdates(bool IsPartial) {
60656065
LookupTable, IsPartial);
60666066

60676067
// Write the lookup table
6068-
RecordData::value_type Record[] = {RecordType, getDeclID(D).getRawValue()};
6068+
RecordData::value_type Record[] = {
6069+
static_cast<RecordData::value_type>(RecordType),
6070+
getDeclID(D).getRawValue()};
60696071
Stream.EmitRecordWithBlob(UpdateSpecializationAbbrev, Record, LookupTable);
60706072
}
60716073
}

0 commit comments

Comments
 (0)
Please sign in to comment.