From b2b169aef03109a3a08bd93cba72894a83288dc4 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 3 Sep 2013 14:41:16 +0000 Subject: [PATCH] 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189813 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/Stmt.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp index 2711e9ba97..5e56b53ae6 100644 --- a/lib/AST/Stmt.cpp +++ b/lib/AST/Stmt.cpp @@ -706,7 +706,7 @@ ObjCForCollectionStmt::ObjCForCollectionStmt(Stmt *Elem, Expr *Collect, SourceLocation RPL) : Stmt(ObjCForCollectionStmtClass) { SubExprs[ELEM] = Elem; - SubExprs[COLLECTION] = reinterpret_cast(Collect); + SubExprs[COLLECTION] = Collect; SubExprs[BODY] = Body; ForLoc = FCL; RParenLoc = RPL; @@ -790,8 +790,8 @@ CXXForRangeStmt::CXXForRangeStmt(DeclStmt *Range, DeclStmt *BeginEndStmt, : Stmt(CXXForRangeStmtClass), ForLoc(FL), ColonLoc(CL), RParenLoc(RPL) { SubExprs[RANGE] = Range; SubExprs[BEGINEND] = BeginEndStmt; - SubExprs[COND] = reinterpret_cast(Cond); - SubExprs[INC] = reinterpret_cast(Inc); + SubExprs[COND] = Cond; + SubExprs[INC] = Inc; SubExprs[LOOPVAR] = LoopVar; SubExprs[BODY] = Body; } @@ -822,7 +822,7 @@ IfStmt::IfStmt(const ASTContext &C, SourceLocation IL, VarDecl *var, Expr *cond, : Stmt(IfStmtClass), IfLoc(IL), ElseLoc(EL) { setConditionVariable(C, var); - SubExprs[COND] = reinterpret_cast(cond); + SubExprs[COND] = cond; SubExprs[THEN] = then; SubExprs[ELSE] = elsev; } @@ -853,8 +853,8 @@ ForStmt::ForStmt(const ASTContext &C, Stmt *Init, Expr *Cond, VarDecl *condVar, { SubExprs[INIT] = Init; setConditionVariable(C, condVar); - SubExprs[COND] = reinterpret_cast(Cond); - SubExprs[INC] = reinterpret_cast(Inc); + SubExprs[COND] = Cond; + SubExprs[INC] = Inc; SubExprs[BODY] = Body; } @@ -881,7 +881,7 @@ SwitchStmt::SwitchStmt(const ASTContext &C, VarDecl *Var, Expr *cond) : Stmt(SwitchStmtClass), FirstCase(0), AllEnumCasesCovered(0) { setConditionVariable(C, Var); - SubExprs[COND] = reinterpret_cast(cond); + SubExprs[COND] = cond; SubExprs[BODY] = NULL; } @@ -914,7 +914,7 @@ WhileStmt::WhileStmt(const ASTContext &C, VarDecl *Var, Expr *cond, Stmt *body, SourceLocation WL) : Stmt(WhileStmtClass) { setConditionVariable(C, Var); - SubExprs[COND] = reinterpret_cast(cond); + SubExprs[COND] = cond; SubExprs[BODY] = body; WhileLoc = WL; } @@ -986,7 +986,7 @@ SEHExceptStmt::SEHExceptStmt(SourceLocation Loc, : Stmt(SEHExceptStmtClass), Loc(Loc) { - Children[FILTER_EXPR] = reinterpret_cast(FilterExpr); + Children[FILTER_EXPR] = FilterExpr; Children[BLOCK] = Block; } -- 2.40.0