// UnaryOperator
Stmt::child_iterator UnaryOperator::child_begin() {
- return child_iterator(reinterpret_cast<Stmt**>(&Val),Opc==SizeOf);
+ return reinterpret_cast<Stmt**>(&Val);
}
Stmt::child_iterator UnaryOperator::child_end() {
- return child_iterator(reinterpret_cast<Stmt**>(&Val)+1,Opc==SizeOf);
+ return reinterpret_cast<Stmt**>(&Val+1);
}
// SizeOfAlignOfTypeExpr
class StmtIteratorBase {
protected:
- enum { DeclMode = 0x1, SizeOfTypeVAMode = 0x2,
- SizeExprMode = 0x3, Flags = 0x3 };
+ enum { DeclMode = 0x1, SizeOfTypeVAMode = 0x2, Flags = 0x3 };
union { Stmt** stmt; ScopedDecl* decl; };
uintptr_t RawVAPtr;
bool inSizeOfTypeVA() const {
return RawVAPtr & SizeOfTypeVAMode ? true : false;
}
-
- bool inSizeOfExpr() const {
- return RawVAPtr & SizeExprMode ? true : false;
- }
-
+
VariableArrayType* getVAPtr() const {
return reinterpret_cast<VariableArrayType*>(RawVAPtr & ~Flags);
}
Stmt*& GetDeclExpr() const;
- StmtIteratorBase(Stmt** s, bool inSizeOfExpr) : stmt(s), RawVAPtr(0) {
- if (inSizeOfExpr) RawVAPtr = SizeExprMode;
- }
-
+ StmtIteratorBase(Stmt** s) : stmt(s), RawVAPtr(0) {}
StmtIteratorBase(ScopedDecl* d);
StmtIteratorBase(VariableArrayType* t);
StmtIteratorBase() : stmt(NULL), RawVAPtr(0) {}
StmtIteratorImpl(const StmtIteratorBase& RHS) : StmtIteratorBase(RHS) {}
public:
StmtIteratorImpl() {}
- StmtIteratorImpl(Stmt** s, bool inSizeOfExpr) : StmtIteratorBase(s,inSizeOfExpr){}
+ StmtIteratorImpl(Stmt** s) : StmtIteratorBase(s) {}
StmtIteratorImpl(ScopedDecl* d) : StmtIteratorBase(d) {}
StmtIteratorImpl(VariableArrayType* t) : StmtIteratorBase(t) {}
struct StmtIterator : public StmtIteratorImpl<StmtIterator,Stmt*&> {
explicit StmtIterator() : StmtIteratorImpl<StmtIterator,Stmt*&>() {}
- StmtIterator(Stmt** S, bool inSizeOfExpr=false)
- : StmtIteratorImpl<StmtIterator,Stmt*&>(S,inSizeOfExpr) {}
+ StmtIterator(Stmt** S) : StmtIteratorImpl<StmtIterator,Stmt*&>(S) {}
StmtIterator(VariableArrayType* t):StmtIteratorImpl<StmtIterator,Stmt*&>(t) {}
StmtIterator(ScopedDecl* D) : StmtIteratorImpl<StmtIterator,Stmt*&>(D) {}