aboutsummaryrefslogtreecommitdiff
path: root/AST/Expr.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-12-14 23:40:56 +0000
committerTed Kremenek <kremenek@apple.com>2007-12-14 23:40:56 +0000
commitb51d2b2d5497693783338c58dd778b6427e85ba7 (patch)
tree9d8fc1b103c720519e595af31d8160df67ac4972 /AST/Expr.cpp
parent58dbdeb69c063f82d644504fc638120198f7fad2 (diff)
Added "mode" to StmtIterator to record if the expression being iterated
over is the subexpression of a sizeof(expression). Different clients will wish to handle iteration over such subexpressions differently, and can now easily query if they are iterating over such statements using the StmtIterator's inSizeOfExpr(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45047 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'AST/Expr.cpp')
-rw-r--r--AST/Expr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/AST/Expr.cpp b/AST/Expr.cpp
index 22767053db..08325fe3a4 100644
--- a/AST/Expr.cpp
+++ b/AST/Expr.cpp
@@ -1028,10 +1028,10 @@ Stmt::child_iterator ParenExpr::child_end() {
// UnaryOperator
Stmt::child_iterator UnaryOperator::child_begin() {
- return reinterpret_cast<Stmt**>(&Val);
+ return child_iterator(reinterpret_cast<Stmt**>(&Val),Opc==SizeOf);
}
Stmt::child_iterator UnaryOperator::child_end() {
- return reinterpret_cast<Stmt**>(&Val)+1;
+ return child_iterator(reinterpret_cast<Stmt**>(&Val)+1,Opc==SizeOf);
}
// SizeOfAlignOfTypeExpr