]> granicus.if.org Git - clang/commitdiff
Get the code decl from the initial location context.
authorZhongxing Xu <xuzhongxing@gmail.com>
Fri, 21 Aug 2009 02:58:11 +0000 (02:58 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Fri, 21 Aug 2009 02:58:11 +0000 (02:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79590 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BasicStore.cpp

index aed5bdc66befe5576669d388d2d43e9190eeef24..f6d3d35f74922c8ac8129638ea189383f03c4887 100644 (file)
@@ -502,7 +502,7 @@ Store BasicStoreManager::getInitialStore(const LocationContext *InitLoc) {
 
     // Handle implicit parameters.
     if (ImplicitParamDecl* PD = dyn_cast<ImplicitParamDecl>(ND)) {
-      const Decl& CD = StateMgr.getCodeDecl();      
+      const Decl& CD = *InitLoc->getDecl();      
       if (const ObjCMethodDecl* MD = dyn_cast<ObjCMethodDecl>(&CD)) {
         if (MD->getSelfDecl() == PD) {
           // Create a region for "self".