[cfe-commits] r108801 - /cfe/trunk/lib/Checker/BasicStore.cpp

Zhongxing Xu xuzhongxing at gmail.com
Mon Jul 19 19:46:11 PDT 2010


Author: zhongxingxu
Date: Mon Jul 19 21:46:11 2010
New Revision: 108801

URL: http://llvm.org/viewvc/llvm-project?rev=108801&view=rev
Log:
constify.

Modified:
    cfe/trunk/lib/Checker/BasicStore.cpp

Modified: cfe/trunk/lib/Checker/BasicStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/BasicStore.cpp?rev=108801&r1=108800&r2=108801&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/BasicStore.cpp (original)
+++ cfe/trunk/lib/Checker/BasicStore.cpp Mon Jul 19 21:46:11 2010
@@ -406,10 +406,10 @@
   Store St = VBFactory.GetEmptyMap().getRoot();
 
   for (LVDataTy::decl_iterator I=D.begin_decl(), E=D.end_decl(); I != E; ++I) {
-    NamedDecl* ND = const_cast<NamedDecl*>(I->first);
+    const NamedDecl* ND = I->first;
 
     // Handle implicit parameters.
-    if (ImplicitParamDecl* PD = dyn_cast<ImplicitParamDecl>(ND)) {
+    if (const ImplicitParamDecl* PD = dyn_cast<ImplicitParamDecl>(ND)) {
       const Decl& CD = *InitLoc->getDecl();
       if (const ObjCMethodDecl* MD = dyn_cast<ObjCMethodDecl>(&CD)) {
         if (MD->getSelfDecl() == PD) {





More information about the cfe-commits mailing list