Skip to content

Commit 3ebb91d

Browse files
authored
[NFC][Clang] Adopt simplified getTrailingObjects in ExprConcepts (#143252)
1 parent 3bf2aec commit 3ebb91d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

clang/include/clang/AST/ExprConcepts.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -514,10 +514,6 @@ class RequiresExpr final : public Expr,
514514
return NumLocalParameters;
515515
}
516516

517-
unsigned numTrailingObjects(OverloadToken<concepts::Requirement *>) const {
518-
return NumRequirements;
519-
}
520-
521517
RequiresExpr(ASTContext &C, SourceLocation RequiresKWLoc,
522518
RequiresExprBodyDecl *Body, SourceLocation LParenLoc,
523519
ArrayRef<ParmVarDecl *> LocalParameters,
@@ -540,13 +536,13 @@ class RequiresExpr final : public Expr,
540536
unsigned NumRequirements);
541537

542538
ArrayRef<ParmVarDecl *> getLocalParameters() const {
543-
return {getTrailingObjects<ParmVarDecl *>(), NumLocalParameters};
539+
return getTrailingObjects<ParmVarDecl *>(NumLocalParameters);
544540
}
545541

546542
RequiresExprBodyDecl *getBody() const { return Body; }
547543

548544
ArrayRef<concepts::Requirement *> getRequirements() const {
549-
return {getTrailingObjects<concepts::Requirement *>(), NumRequirements};
545+
return getTrailingObjects<concepts::Requirement *>(NumRequirements);
550546
}
551547

552548
/// \brief Whether or not the requires clause is satisfied.

0 commit comments

Comments
 (0)