[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in ExprObjC (PR #143254)

Rahul Joshi via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 7 05:02:03 PDT 2025


https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/143254

None

>From 8417ea58f74422823dd1863ccaefb7f8c538ab79 Mon Sep 17 00:00:00 2001
From: Rahul Joshi <rjoshi at nvidia.com>
Date: Sat, 7 Jun 2025 04:03:13 -0700
Subject: [PATCH] [NFC][Clang] Adopt simplified `getTrailingObjects` in
 ExprObjC

---
 clang/include/clang/AST/ExprObjC.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/clang/include/clang/AST/ExprObjC.h b/clang/include/clang/AST/ExprObjC.h
index f87fa85569c44..3d9b3c4585e8a 100644
--- a/clang/include/clang/AST/ExprObjC.h
+++ b/clang/include/clang/AST/ExprObjC.h
@@ -217,12 +217,10 @@ class ObjCArrayLiteral final
   SourceRange getSourceRange() const LLVM_READONLY { return Range; }
 
   /// Retrieve elements of array of literals.
-  Expr **getElements() { return getTrailingObjects<Expr *>(); }
+  Expr **getElements() { return getTrailingObjects(); }
 
   /// Retrieve elements of array of literals.
-  const Expr * const *getElements() const {
-    return getTrailingObjects<Expr *>();
-  }
+  const Expr *const *getElements() const { return getTrailingObjects(); }
 
   /// getNumElements - Return number of elements of objective-c array literal.
   unsigned getNumElements() const { return NumElements; }



More information about the cfe-commits mailing list