Remove useless reinterpret_casts from Stmt.cpp

Summary:
I have no idea why these were there in the first place, but now they are
certainly not necessary.

Reviewers: rsmith

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1581

llvm-svn: 189813
This commit is contained in:
Pavel Labath 2013-09-03 14:41:16 +00:00
parent 710a902cac
commit 515f4db4f9
1 changed files with 9 additions and 9 deletions

View File

@ -706,7 +706,7 @@ ObjCForCollectionStmt::ObjCForCollectionStmt(Stmt *Elem, Expr *Collect,
SourceLocation RPL) SourceLocation RPL)
: Stmt(ObjCForCollectionStmtClass) { : Stmt(ObjCForCollectionStmtClass) {
SubExprs[ELEM] = Elem; SubExprs[ELEM] = Elem;
SubExprs[COLLECTION] = reinterpret_cast<Stmt*>(Collect); SubExprs[COLLECTION] = Collect;
SubExprs[BODY] = Body; SubExprs[BODY] = Body;
ForLoc = FCL; ForLoc = FCL;
RParenLoc = RPL; RParenLoc = RPL;
@ -790,8 +790,8 @@ CXXForRangeStmt::CXXForRangeStmt(DeclStmt *Range, DeclStmt *BeginEndStmt,
: Stmt(CXXForRangeStmtClass), ForLoc(FL), ColonLoc(CL), RParenLoc(RPL) { : Stmt(CXXForRangeStmtClass), ForLoc(FL), ColonLoc(CL), RParenLoc(RPL) {
SubExprs[RANGE] = Range; SubExprs[RANGE] = Range;
SubExprs[BEGINEND] = BeginEndStmt; SubExprs[BEGINEND] = BeginEndStmt;
SubExprs[COND] = reinterpret_cast<Stmt*>(Cond); SubExprs[COND] = Cond;
SubExprs[INC] = reinterpret_cast<Stmt*>(Inc); SubExprs[INC] = Inc;
SubExprs[LOOPVAR] = LoopVar; SubExprs[LOOPVAR] = LoopVar;
SubExprs[BODY] = Body; SubExprs[BODY] = Body;
} }
@ -822,7 +822,7 @@ IfStmt::IfStmt(const ASTContext &C, SourceLocation IL, VarDecl *var, Expr *cond,
: Stmt(IfStmtClass), IfLoc(IL), ElseLoc(EL) : Stmt(IfStmtClass), IfLoc(IL), ElseLoc(EL)
{ {
setConditionVariable(C, var); setConditionVariable(C, var);
SubExprs[COND] = reinterpret_cast<Stmt*>(cond); SubExprs[COND] = cond;
SubExprs[THEN] = then; SubExprs[THEN] = then;
SubExprs[ELSE] = elsev; SubExprs[ELSE] = elsev;
} }
@ -853,8 +853,8 @@ ForStmt::ForStmt(const ASTContext &C, Stmt *Init, Expr *Cond, VarDecl *condVar,
{ {
SubExprs[INIT] = Init; SubExprs[INIT] = Init;
setConditionVariable(C, condVar); setConditionVariable(C, condVar);
SubExprs[COND] = reinterpret_cast<Stmt*>(Cond); SubExprs[COND] = Cond;
SubExprs[INC] = reinterpret_cast<Stmt*>(Inc); SubExprs[INC] = Inc;
SubExprs[BODY] = Body; SubExprs[BODY] = Body;
} }
@ -881,7 +881,7 @@ SwitchStmt::SwitchStmt(const ASTContext &C, VarDecl *Var, Expr *cond)
: Stmt(SwitchStmtClass), FirstCase(0), AllEnumCasesCovered(0) : Stmt(SwitchStmtClass), FirstCase(0), AllEnumCasesCovered(0)
{ {
setConditionVariable(C, Var); setConditionVariable(C, Var);
SubExprs[COND] = reinterpret_cast<Stmt*>(cond); SubExprs[COND] = cond;
SubExprs[BODY] = NULL; SubExprs[BODY] = NULL;
} }
@ -914,7 +914,7 @@ WhileStmt::WhileStmt(const ASTContext &C, VarDecl *Var, Expr *cond, Stmt *body,
SourceLocation WL) SourceLocation WL)
: Stmt(WhileStmtClass) { : Stmt(WhileStmtClass) {
setConditionVariable(C, Var); setConditionVariable(C, Var);
SubExprs[COND] = reinterpret_cast<Stmt*>(cond); SubExprs[COND] = cond;
SubExprs[BODY] = body; SubExprs[BODY] = body;
WhileLoc = WL; WhileLoc = WL;
} }
@ -986,7 +986,7 @@ SEHExceptStmt::SEHExceptStmt(SourceLocation Loc,
: Stmt(SEHExceptStmtClass), : Stmt(SEHExceptStmtClass),
Loc(Loc) Loc(Loc)
{ {
Children[FILTER_EXPR] = reinterpret_cast<Stmt*>(FilterExpr); Children[FILTER_EXPR] = FilterExpr;
Children[BLOCK] = Block; Children[BLOCK] = Block;
} }