diff options
-rw-r--r-- | lib/Analysis/GRExprEngine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index 487b9764ce..3f59ba6524 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -209,7 +209,7 @@ const GRState* GRExprEngine::getInitialState(const LocationContext *InitLoc) { // to be > 0. // FIXME: It would be nice if we had a more general mechanism to add // such preconditions. Some day. - if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(&StateMgr.getCodeDecl())) + if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(InitLoc->getDecl())) if (strcmp(FD->getIdentifier()->getName(), "main") == 0 && FD->getNumParams() > 0) { const ParmVarDecl *PD = FD->getParamDecl(0); |