[cfe-commits] r41512 - /cfe/trunk/AST/Expr.cpp
Ted Kremenek
kremenek at apple.com
Mon Aug 27 14:11:45 PDT 2007
Author: kremenek
Date: Mon Aug 27 16:11:44 2007
New Revision: 41512
URL: http://llvm.org/viewvc/llvm-project?rev=41512&view=rev
Log:
Fixed bug in child_begin/child_end for CallExpr where we incorrectly calculated a Stmt** pointer
based on an offset within SubExprs.
Modified:
cfe/trunk/AST/Expr.cpp
Modified: cfe/trunk/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/Expr.cpp?rev=41512&r1=41511&r2=41512&view=diff
==============================================================================
--- cfe/trunk/AST/Expr.cpp (original)
+++ cfe/trunk/AST/Expr.cpp Mon Aug 27 16:11:44 2007
@@ -780,10 +780,10 @@
// 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
More information about the cfe-commits
mailing list