@@ -2606,9 +2606,6 @@ class CXXConstructorDecl final
2606
2606
size_t numTrailingObjects (OverloadToken<InheritedConstructor>) const {
2607
2607
return CXXConstructorDeclBits.IsInheritingConstructor ;
2608
2608
}
2609
- size_t numTrailingObjects (OverloadToken<ExplicitSpecifier>) const {
2610
- return CXXConstructorDeclBits.HasTrailingExplicitSpecifier ;
2611
- }
2612
2609
2613
2610
ExplicitSpecifier getExplicitSpecifierInternal () const {
2614
2611
if (CXXConstructorDeclBits.HasTrailingExplicitSpecifier )
@@ -2625,8 +2622,12 @@ class CXXConstructorDecl final
2625
2622
};
2626
2623
2627
2624
uint64_t getTrailingAllocKind () const {
2628
- return numTrailingObjects (OverloadToken<InheritedConstructor>()) |
2629
- (numTrailingObjects (OverloadToken<ExplicitSpecifier>()) << 1 );
2625
+ uint64_t Kind = 0 ;
2626
+ if (CXXConstructorDeclBits.IsInheritingConstructor )
2627
+ Kind |= TAKInheritsConstructor;
2628
+ if (CXXConstructorDeclBits.HasTrailingExplicitSpecifier )
2629
+ Kind |= TAKHasTailExplicit;
2630
+ return Kind;
2630
2631
}
2631
2632
2632
2633
public:
@@ -3864,7 +3865,7 @@ class UsingPackDecl final
3864
3865
InstantiatedFrom ? InstantiatedFrom->getDeclName()
3865
3866
: DeclarationName()),
3866
3867
InstantiatedFrom(InstantiatedFrom), NumExpansions(UsingDecls.size()) {
3867
- llvm::uninitialized_copy (UsingDecls, getTrailingObjects<NamedDecl *> ());
3868
+ llvm::uninitialized_copy (UsingDecls, getTrailingObjects ());
3868
3869
}
3869
3870
3870
3871
void anchor () override ;
@@ -3882,7 +3883,7 @@ class UsingPackDecl final
3882
3883
// / Get the set of using declarations that this pack expanded into. Note that
3883
3884
// / some of these may still be unresolved.
3884
3885
ArrayRef<NamedDecl *> expansions () const {
3885
- return getTrailingObjects<NamedDecl *> (NumExpansions);
3886
+ return getTrailingObjects (NumExpansions);
3886
3887
}
3887
3888
3888
3889
static UsingPackDecl *Create (ASTContext &C, DeclContext *DC,
@@ -4235,7 +4236,7 @@ class DecompositionDecl final
4235
4236
: VarDecl(Decomposition, C, DC, StartLoc, LSquareLoc, nullptr , T, TInfo,
4236
4237
SC),
4237
4238
NumBindings (Bindings.size()) {
4238
- llvm::uninitialized_copy (Bindings, getTrailingObjects<BindingDecl *> ());
4239
+ llvm::uninitialized_copy (Bindings, getTrailingObjects ());
4239
4240
for (auto *B : Bindings) {
4240
4241
B->setDecomposedDecl (this );
4241
4242
if (B->isParameterPack () && B->getBinding ()) {
@@ -4262,8 +4263,8 @@ class DecompositionDecl final
4262
4263
unsigned NumBindings);
4263
4264
4264
4265
// Provide the range of bindings which may have a nested pack.
4265
- llvm:: ArrayRef<BindingDecl *> bindings () const {
4266
- return { getTrailingObjects<BindingDecl *>(), NumBindings} ;
4266
+ ArrayRef<BindingDecl *> bindings () const {
4267
+ return getTrailingObjects ( NumBindings) ;
4267
4268
}
4268
4269
4269
4270
// Provide a flattened range to visit each binding.
0 commit comments