From 42a297700e0bb916762e7af780e026010357b4f9 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 27 Aug 2007 21:11:44 +0000 Subject: [PATCH] Fixed bug in child_begin/child_end for CallExpr where we incorrectly calculated a Stmt** pointer based on an offset within SubExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41512 91177308-0d34-0410-b5e6-96231b3b80d8 --- AST/Expr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AST/Expr.cpp b/AST/Expr.cpp index 0f6ac7492b..cacfcfa0ca 100644 --- a/AST/Expr.cpp +++ b/AST/Expr.cpp @@ -780,10 +780,10 @@ Stmt::child_iterator ArraySubscriptExpr::child_end() { // CallExpr Stmt::child_iterator CallExpr::child_begin() { - return reinterpret_cast(&SubExprs); + return reinterpret_cast(&SubExprs[0]); } Stmt::child_iterator CallExpr::child_end() { - return reinterpret_cast(&SubExprs)+NumArgs+ARGS_START; + return reinterpret_cast(&SubExprs[NumArgs+ARGS_START]); } // MemberExpr -- 2.40.0