Refactor the tree transform's many loops over sets of expressions
(transforming each in turn) into calls into one central routine
(TransformExprs) that transforms a list of expressions. This
refactoring is preparatory work for pack expansions whose in an
expression-list.
No functionality change.
llvm-svn: 122761
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index d8bb0af..3a71883 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -2300,7 +2300,7 @@
SelectorLoc(SelLoc), LBracLoc(LBracLoc), RBracLoc(RBracLoc)
{
setReceiverPointer(Receiver);
- Stmt **MyArgs = getArgs();
+ Expr **MyArgs = getArgs();
for (unsigned I = 0; I != NumArgs; ++I) {
if (Args[I]->isTypeDependent())
ExprBits.TypeDependent = true;
@@ -2331,7 +2331,7 @@
SelectorLoc(SelLoc), LBracLoc(LBracLoc), RBracLoc(RBracLoc)
{
setReceiverPointer(Receiver);
- Stmt **MyArgs = getArgs();
+ Expr **MyArgs = getArgs();
for (unsigned I = 0; I != NumArgs; ++I) {
if (Args[I]->isTypeDependent())
ExprBits.TypeDependent = true;
@@ -2928,10 +2928,10 @@
Stmt::child_iterator ObjCMessageExpr::child_begin() {
if (getReceiverKind() == Instance)
return reinterpret_cast<Stmt **>(this + 1);
- return getArgs();
+ return reinterpret_cast<Stmt **>(getArgs());
}
Stmt::child_iterator ObjCMessageExpr::child_end() {
- return getArgs() + getNumArgs();
+ return reinterpret_cast<Stmt **>(getArgs() + getNumArgs());
}
// Blocks