@@ -2606,9 +2606,6 @@ class CXXConstructorDecl final
26062606 size_t numTrailingObjects (OverloadToken<InheritedConstructor>) const {
26072607 return CXXConstructorDeclBits.IsInheritingConstructor ;
26082608 }
2609- size_t numTrailingObjects (OverloadToken<ExplicitSpecifier>) const {
2610- return CXXConstructorDeclBits.HasTrailingExplicitSpecifier ;
2611- }
26122609
26132610 ExplicitSpecifier getExplicitSpecifierInternal () const {
26142611 if (CXXConstructorDeclBits.HasTrailingExplicitSpecifier )
@@ -2625,8 +2622,12 @@ class CXXConstructorDecl final
26252622 };
26262623
26272624 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;
26302631 }
26312632
26322633public:
@@ -3864,7 +3865,7 @@ class UsingPackDecl final
38643865 InstantiatedFrom ? InstantiatedFrom->getDeclName()
38653866 : DeclarationName()),
38663867 InstantiatedFrom(InstantiatedFrom), NumExpansions(UsingDecls.size()) {
3867- llvm::uninitialized_copy (UsingDecls, getTrailingObjects<NamedDecl *> ());
3868+ llvm::uninitialized_copy (UsingDecls, getTrailingObjects ());
38683869 }
38693870
38703871 void anchor () override ;
@@ -3882,7 +3883,7 @@ class UsingPackDecl final
38823883 // / Get the set of using declarations that this pack expanded into. Note that
38833884 // / some of these may still be unresolved.
38843885 ArrayRef<NamedDecl *> expansions () const {
3885- return getTrailingObjects<NamedDecl *> (NumExpansions);
3886+ return getTrailingObjects (NumExpansions);
38863887 }
38873888
38883889 static UsingPackDecl *Create (ASTContext &C, DeclContext *DC,
@@ -4235,7 +4236,7 @@ class DecompositionDecl final
42354236 : VarDecl(Decomposition, C, DC, StartLoc, LSquareLoc, nullptr , T, TInfo,
42364237 SC),
42374238 NumBindings (Bindings.size()) {
4238- llvm::uninitialized_copy (Bindings, getTrailingObjects<BindingDecl *> ());
4239+ llvm::uninitialized_copy (Bindings, getTrailingObjects ());
42394240 for (auto *B : Bindings) {
42404241 B->setDecomposedDecl (this );
42414242 if (B->isParameterPack () && B->getBinding ()) {
@@ -4262,8 +4263,8 @@ class DecompositionDecl final
42624263 unsigned NumBindings);
42634264
42644265 // 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) ;
42674268 }
42684269
42694270 // Provide a flattened range to visit each binding.
0 commit comments