From: Zhongxing Xu Date: Fri, 23 Jul 2010 02:54:53 +0000 (+0000) Subject: Delete unnecessary const_cast. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f19124c70093d2ef0c06eed63ca6080611800a3;p=clang Delete unnecessary const_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109211 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Checker/GRExprEngine.cpp b/lib/Checker/GRExprEngine.cpp index fe45b7f013..e2d3bd6668 100644 --- a/lib/Checker/GRExprEngine.cpp +++ b/lib/Checker/GRExprEngine.cpp @@ -2534,7 +2534,7 @@ void GRExprEngine::VisitDeclStmt(const DeclStmt *DS, ExplodedNode *Pred, return; const VarDecl* VD = dyn_cast(D); - const Expr* InitEx = const_cast(VD->getInit()); + const Expr* InitEx = VD->getInit(); // FIXME: static variables may have an initializer, but the second // time a function is called those values may not be current.