@@ -5352,10 +5352,6 @@ class FunctionProtoType final
5352
5352
return getNumFunctionEffects ();
5353
5353
}
5354
5354
5355
- unsigned numTrailingObjects (OverloadToken<EffectConditionExpr>) const {
5356
- return getNumFunctionEffectConditions ();
5357
- }
5358
-
5359
5355
// / Determine whether there are any argument types that
5360
5356
// / contain an unexpanded parameter pack.
5361
5357
static bool containsAnyUnexpandedParameterPack (const QualType *ArgArray,
@@ -5686,8 +5682,8 @@ class FunctionProtoType final
5686
5682
if (hasExtraBitfields ()) {
5687
5683
const auto *Bitfields = getTrailingObjects<FunctionTypeExtraBitfields>();
5688
5684
if (Bitfields->NumFunctionEffects > 0 )
5689
- return { getTrailingObjects<FunctionEffect>(),
5690
- Bitfields->NumFunctionEffects } ;
5685
+ return getTrailingObjects<FunctionEffect>(
5686
+ Bitfields->NumFunctionEffects ) ;
5691
5687
}
5692
5688
return {};
5693
5689
}
@@ -5706,8 +5702,8 @@ class FunctionProtoType final
5706
5702
if (hasExtraBitfields ()) {
5707
5703
const auto *Bitfields = getTrailingObjects<FunctionTypeExtraBitfields>();
5708
5704
if (Bitfields->EffectsHaveConditions )
5709
- return { getTrailingObjects<EffectConditionExpr>(),
5710
- Bitfields->NumFunctionEffects } ;
5705
+ return getTrailingObjects<EffectConditionExpr>(
5706
+ Bitfields->NumFunctionEffects ) ;
5711
5707
}
5712
5708
return {};
5713
5709
}
@@ -5721,8 +5717,7 @@ class FunctionProtoType final
5721
5717
? Bitfields->NumFunctionEffects
5722
5718
: 0 ;
5723
5719
return FunctionEffectsRef (
5724
- {getTrailingObjects<FunctionEffect>(),
5725
- Bitfields->NumFunctionEffects },
5720
+ getTrailingObjects<FunctionEffect>(Bitfields->NumFunctionEffects ),
5726
5721
{NumConds ? getTrailingObjects<EffectConditionExpr>() : nullptr ,
5727
5722
NumConds});
5728
5723
}
@@ -6063,8 +6058,6 @@ class PackIndexingType final
6063
6058
6064
6059
static TypeDependence computeDependence (QualType Pattern, Expr *IndexExpr,
6065
6060
ArrayRef<QualType> Expansions = {});
6066
-
6067
- unsigned numTrailingObjects (OverloadToken<QualType>) const { return Size; }
6068
6061
};
6069
6062
6070
6063
// / A unary type transform, which is a type constructed from another.
@@ -6491,8 +6484,7 @@ class HLSLInlineSpirvType final
6491
6484
for (size_t I = 0 ; I < NumOperands; I++) {
6492
6485
// Since Operands are stored as a trailing object, they have not been
6493
6486
// initialized yet. Call the constructor manually.
6494
- auto *Operand =
6495
- new (&getTrailingObjects<SpirvOperand>()[I]) SpirvOperand ();
6487
+ auto *Operand = new (&getTrailingObjects ()[I]) SpirvOperand ();
6496
6488
*Operand = Operands[I];
6497
6489
}
6498
6490
}
@@ -6502,7 +6494,7 @@ class HLSLInlineSpirvType final
6502
6494
uint32_t getSize () const { return Size; }
6503
6495
uint32_t getAlignment () const { return Alignment; }
6504
6496
ArrayRef<SpirvOperand> getOperands () const {
6505
- return { getTrailingObjects<SpirvOperand>(), NumOperands} ;
6497
+ return getTrailingObjects<SpirvOperand>(NumOperands) ;
6506
6498
}
6507
6499
6508
6500
bool isSugared () const { return false ; }
@@ -6602,7 +6594,7 @@ class SubstTemplateTypeParmType final
6602
6594
// / parameter.
6603
6595
QualType getReplacementType () const {
6604
6596
return SubstTemplateTypeParmTypeBits.HasNonCanonicalUnderlyingType
6605
- ? *getTrailingObjects<QualType> ()
6597
+ ? *getTrailingObjects ()
6606
6598
: getCanonicalTypeInternal ();
6607
6599
}
6608
6600
@@ -7164,7 +7156,7 @@ class ElaboratedType final
7164
7156
ElaboratedTypeBits.HasOwnedTagDecl = false ;
7165
7157
if (OwnedTagDecl) {
7166
7158
ElaboratedTypeBits.HasOwnedTagDecl = true ;
7167
- *getTrailingObjects<TagDecl *> () = OwnedTagDecl;
7159
+ *getTrailingObjects () = OwnedTagDecl;
7168
7160
}
7169
7161
}
7170
7162
@@ -7184,8 +7176,7 @@ class ElaboratedType final
7184
7176
// / Return the (re)declaration of this type owned by this occurrence of this
7185
7177
// / type, or nullptr if there is none.
7186
7178
TagDecl *getOwnedTagDecl () const {
7187
- return ElaboratedTypeBits.HasOwnedTagDecl ? *getTrailingObjects<TagDecl *>()
7188
- : nullptr ;
7179
+ return ElaboratedTypeBits.HasOwnedTagDecl ? *getTrailingObjects () : nullptr ;
7189
7180
}
7190
7181
7191
7182
void Profile (llvm::FoldingSetNodeID &ID) {
0 commit comments