[clang] b43df5b - PseudoObjectExpr: Prefer ArrayRef over iterator_range when iterating with pointers
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 18 16:44:11 PDT 2023
Author: David Blaikie
Date: 2023-07-18T23:43:41Z
New Revision: b43df5bfe7e7ef358e135b515b0651ec51f635d8
URL: https://github.com/llvm/llvm-project/commit/b43df5bfe7e7ef358e135b515b0651ec51f635d8
DIFF: https://github.com/llvm/llvm-project/commit/b43df5bfe7e7ef358e135b515b0651ec51f635d8.diff
LOG: PseudoObjectExpr: Prefer ArrayRef over iterator_range when iterating with pointers
Simpler to use ArrayRef directly here rather than a more
generic/customizable range helper like iterator_range
Added:
Modified:
clang/include/clang/AST/Expr.h
Removed:
################################################################################
diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h
index 661a8a7175ca88..7a886f546ed937 100644
--- a/clang/include/clang/AST/Expr.h
+++ b/clang/include/clang/AST/Expr.h
@@ -6356,11 +6356,11 @@ class PseudoObjectExpr final
return getSubExprsBuffer() + getNumSubExprs();
}
- llvm::iterator_range<semantics_iterator> semantics() {
- return llvm::make_range(semantics_begin(), semantics_end());
+ ArrayRef<Expr*> semantics() {
+ return ArrayRef(semantics_begin(), semantics_end());
}
- llvm::iterator_range<const_semantics_iterator> semantics() const {
- return llvm::make_range(semantics_begin(), semantics_end());
+ ArrayRef<const Expr*> semantics() const {
+ return ArrayRef(semantics_begin(), semantics_end());
}
Expr *getSemanticExpr(unsigned index) {
More information about the cfe-commits
mailing list