Skip to content

Commit c02d17d

Browse files
committed
[clang][bytecode][NFC] Fix ternary operators with known IsArray values
After #146471, the values here are known.
1 parent d1827f0 commit c02d17d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,8 +1544,7 @@ static bool interp__builtin_operator_new(InterpState &S, CodePtr OpPC,
15441544
// Composite arrays
15451545
if (IsArray) {
15461546
const Descriptor *Desc =
1547-
S.P.createDescriptor(NewCall, ElemType.getTypePtr(),
1548-
IsArray ? std::nullopt : Descriptor::InlineDescMD);
1547+
S.P.createDescriptor(NewCall, ElemType.getTypePtr(), std::nullopt);
15491548
Block *B =
15501549
Allocator.allocate(Desc, NumElems.getZExtValue(), S.Ctx.getEvalID(),
15511550
DynamicAllocator::Form::Operator);
@@ -1558,9 +1557,8 @@ static bool interp__builtin_operator_new(InterpState &S, CodePtr OpPC,
15581557
QualType AllocType = S.getASTContext().getConstantArrayType(
15591558
ElemType, NumElems, nullptr, ArraySizeModifier::Normal, 0);
15601559

1561-
const Descriptor *Desc =
1562-
S.P.createDescriptor(NewCall, AllocType.getTypePtr(),
1563-
IsArray ? std::nullopt : Descriptor::InlineDescMD);
1560+
const Descriptor *Desc = S.P.createDescriptor(NewCall, AllocType.getTypePtr(),
1561+
Descriptor::InlineDescMD);
15641562
Block *B = Allocator.allocate(Desc, S.getContext().getEvalID(),
15651563
DynamicAllocator::Form::Operator);
15661564
assert(B);

0 commit comments

Comments
 (0)