[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in StmtCXX (PR #143251)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 7 06:28:53 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/143251.diff
1 Files Affected:
- (modified) clang/include/clang/AST/StmtCXX.h (+4-4)
``````````diff
diff --git a/clang/include/clang/AST/StmtCXX.h b/clang/include/clang/AST/StmtCXX.h
index a15a445fbea40..5d68d3ef64a20 100644
--- a/clang/include/clang/AST/StmtCXX.h
+++ b/clang/include/clang/AST/StmtCXX.h
@@ -80,8 +80,8 @@ class CXXTryStmt final : public Stmt,
CXXTryStmt(EmptyShell Empty, unsigned numHandlers)
: Stmt(CXXTryStmtClass), NumHandlers(numHandlers) { }
- Stmt *const *getStmts() const { return getTrailingObjects<Stmt *>(); }
- Stmt **getStmts() { return getTrailingObjects<Stmt *>(); }
+ Stmt *const *getStmts() const { return getTrailingObjects(); }
+ Stmt **getStmts() { return getTrailingObjects(); }
public:
static CXXTryStmt *Create(const ASTContext &C, SourceLocation tryLoc,
@@ -339,9 +339,9 @@ class CoroutineBodyStmt final
friend class ASTReader;
friend TrailingObjects;
- Stmt **getStoredStmts() { return getTrailingObjects<Stmt *>(); }
+ Stmt **getStoredStmts() { return getTrailingObjects(); }
- Stmt *const *getStoredStmts() const { return getTrailingObjects<Stmt *>(); }
+ Stmt *const *getStoredStmts() const { return getTrailingObjects(); }
public:
``````````
</details>
https://github.com/llvm/llvm-project/pull/143251
More information about the cfe-commits
mailing list