Skip to content

[NFC][Clang] Adopt simplified getTrailingObjects in StmtCXX #143251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2025

Conversation

jurahul
Copy link
Contributor

@jurahul jurahul commented Jun 7, 2025

No description provided.

@jurahul jurahul marked this pull request as ready for review June 7, 2025 13:28
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Jun 7, 2025
@jurahul jurahul requested a review from erichkeane June 7, 2025 13:28
@llvmbot
Copy link
Member

llvmbot commented Jun 7, 2025

@llvm/pr-subscribers-clang

Author: Rahul Joshi (jurahul)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/143251.diff

1 Files Affected:

  • (modified) clang/include/clang/AST/StmtCXX.h (+4-4)
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:
 

@jurahul jurahul merged commit 3bf2aec into llvm:main Jun 7, 2025
12 checks passed
@jurahul jurahul deleted the clang_trailingObjects_StmtCXX branch June 7, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants