[cfe-commits] r50585 - /cfe/trunk/lib/AST/Expr.cpp
Ted Kremenek
kremenek at apple.com
Fri May 2 11:40:22 PDT 2008
Author: kremenek
Date: Fri May 2 13:40:22 2008
New Revision: 50585
URL: http://llvm.org/viewvc/llvm-project?rev=50585&view=rev
Log:
Fixed bug in ObjCIVarExpr: the child iterator now iterates over the Base expression.
Modified:
cfe/trunk/lib/AST/Expr.cpp
Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=50585&r1=50584&r2=50585&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Fri May 2 13:40:22 2008
@@ -1180,8 +1180,13 @@
Stmt::child_iterator DeclRefExpr::child_end() { return child_iterator(); }
// ObjCIvarRefExpr
-Stmt::child_iterator ObjCIvarRefExpr::child_begin() { return child_iterator(); }
-Stmt::child_iterator ObjCIvarRefExpr::child_end() { return child_iterator(); }
+Stmt::child_iterator ObjCIvarRefExpr::child_begin() {
+ return reinterpret_cast<Stmt**>(&Base);
+}
+
+Stmt::child_iterator ObjCIvarRefExpr::child_end() {
+ return reinterpret_cast<Stmt**>(&Base)+1;
+}
// PreDefinedExpr
Stmt::child_iterator PreDefinedExpr::child_begin() { return child_iterator(); }
More information about the cfe-commits
mailing list