[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in ExprConcepts (PR #143252)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 7 06:29:25 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Rahul Joshi (jurahul)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/143252.diff
1 Files Affected:
- (modified) clang/include/clang/AST/ExprConcepts.h (+2-6)
``````````diff
diff --git a/clang/include/clang/AST/ExprConcepts.h b/clang/include/clang/AST/ExprConcepts.h
index f988d40cf73c3..8df5cdcaa9d75 100644
--- a/clang/include/clang/AST/ExprConcepts.h
+++ b/clang/include/clang/AST/ExprConcepts.h
@@ -514,10 +514,6 @@ class RequiresExpr final : public Expr,
return NumLocalParameters;
}
- unsigned numTrailingObjects(OverloadToken<concepts::Requirement *>) const {
- return NumRequirements;
- }
-
RequiresExpr(ASTContext &C, SourceLocation RequiresKWLoc,
RequiresExprBodyDecl *Body, SourceLocation LParenLoc,
ArrayRef<ParmVarDecl *> LocalParameters,
@@ -540,13 +536,13 @@ class RequiresExpr final : public Expr,
unsigned NumRequirements);
ArrayRef<ParmVarDecl *> getLocalParameters() const {
- return {getTrailingObjects<ParmVarDecl *>(), NumLocalParameters};
+ return getTrailingObjects<ParmVarDecl *>(NumLocalParameters);
}
RequiresExprBodyDecl *getBody() const { return Body; }
ArrayRef<concepts::Requirement *> getRequirements() const {
- return {getTrailingObjects<concepts::Requirement *>(), NumRequirements};
+ return getTrailingObjects<concepts::Requirement *>(NumRequirements);
}
/// \brief Whether or not the requires clause is satisfied.
``````````
</details>
https://github.com/llvm/llvm-project/pull/143252
More information about the cfe-commits
mailing list