Skip to content

Commit de256ac

Browse files
authored
[NFC][Clang] Adopt simplified getTrailingObjects in StmtObjC (#143256)
1 parent b4382a2 commit de256ac

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang/include/clang/AST/StmtObjC.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ class ObjCAtTryStmt final
166166
: public Stmt,
167167
private llvm::TrailingObjects<ObjCAtTryStmt, Stmt *> {
168168
friend TrailingObjects;
169-
size_t numTrailingObjects(OverloadToken<Stmt *>) const {
169+
170+
size_t numTrailingStatements() const {
170171
return 1 + NumCatchStmts + HasFinally;
171172
}
172173

@@ -185,8 +186,8 @@ class ObjCAtTryStmt final
185186
/// The order of the statements in memory follows the order in the source,
186187
/// with the \@try body first, followed by the \@catch statements (if any)
187188
/// and, finally, the \@finally (if it exists).
188-
Stmt **getStmts() { return getTrailingObjects<Stmt *>(); }
189-
Stmt *const *getStmts() const { return getTrailingObjects<Stmt *>(); }
189+
Stmt **getStmts() { return getTrailingObjects(); }
190+
Stmt *const *getStmts() const { return getTrailingObjects(); }
190191

191192
ObjCAtTryStmt(SourceLocation atTryLoc, Stmt *atTryStmt,
192193
Stmt **CatchStmts, unsigned NumCatchStmts,
@@ -262,8 +263,7 @@ class ObjCAtTryStmt final
262263
}
263264

264265
child_range children() {
265-
return child_range(
266-
getStmts(), getStmts() + numTrailingObjects(OverloadToken<Stmt *>()));
266+
return child_range(getStmts(), getStmts() + numTrailingStatements());
267267
}
268268

269269
const_child_range children() const {

0 commit comments

Comments
 (0)