]> granicus.if.org Git - clang/commitdiff
Fixed bug in child_begin/child_end for CallExpr where we incorrectly calculated a...
authorTed Kremenek <kremenek@apple.com>
Mon, 27 Aug 2007 21:11:44 +0000 (21:11 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 27 Aug 2007 21:11:44 +0000 (21:11 +0000)
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

index 0f6ac7492b7fadd6a8a21703d88c81e85835b684..cacfcfa0ca9e41daf9219501d9be9d183b5e1396 100644 (file)
@@ -780,10 +780,10 @@ Stmt::child_iterator ArraySubscriptExpr::child_end() {
 
 // CallExpr
 Stmt::child_iterator CallExpr::child_begin() {
-  return reinterpret_cast<Stmt**>(&SubExprs);
+  return reinterpret_cast<Stmt**>(&SubExprs[0]);
 }
 Stmt::child_iterator CallExpr::child_end() {
-  return reinterpret_cast<Stmt**>(&SubExprs)+NumArgs+ARGS_START;
+  return reinterpret_cast<Stmt**>(&SubExprs[NumArgs+ARGS_START]);
 }
 
 // MemberExpr