]> granicus.if.org Git - clang/commitdiff
Delete unnecessary const_cast.
authorZhongxing Xu <xuzhongxing@gmail.com>
Fri, 23 Jul 2010 02:54:53 +0000 (02:54 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Fri, 23 Jul 2010 02:54:53 +0000 (02:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109211 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Checker/GRExprEngine.cpp

index fe45b7f013563e1ec10a3c32bbe13116955bc90a..e2d3bd6668719ab83dd94b8024224a7d151d760e 100644 (file)
@@ -2534,7 +2534,7 @@ void GRExprEngine::VisitDeclStmt(const DeclStmt *DS, ExplodedNode *Pred,
     return;
 
   const VarDecl* VD = dyn_cast<VarDecl>(D);
-  const Expr* InitEx = const_cast<Expr*>(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.