From: Zhongxing Xu Date: Fri, 21 Aug 2009 02:58:11 +0000 (+0000) Subject: Get the code decl from the initial location context. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eda95463235ce5aca012e08e8468fe3ac85cbd43;p=clang Get the code decl from the initial location context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79590 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp index aed5bdc66b..f6d3d35f74 100644 --- a/lib/Analysis/BasicStore.cpp +++ b/lib/Analysis/BasicStore.cpp @@ -502,7 +502,7 @@ Store BasicStoreManager::getInitialStore(const LocationContext *InitLoc) { // Handle implicit parameters. if (ImplicitParamDecl* PD = dyn_cast(ND)) { - const Decl& CD = StateMgr.getCodeDecl(); + const Decl& CD = *InitLoc->getDecl(); if (const ObjCMethodDecl* MD = dyn_cast(&CD)) { if (MD->getSelfDecl() == PD) { // Create a region for "self".