diff options
| author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-08-21 03:05:36 +0000 |
|---|---|---|
| committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-08-21 03:05:36 +0000 |
| commit | 71900fbac76541d9a59fc7ef62a8665bfac2f731 (patch) | |
| tree | e84b7ac4ce1d60269914784fd9f764c2e8d5f5ee /clang/lib/Analysis/GRExprEngine.cpp | |
| parent | 871918c76f9dc6858aaa7c1929237addacbbd25c (diff) | |
| download | bcm5719-llvm-71900fbac76541d9a59fc7ef62a8665bfac2f731.tar.gz bcm5719-llvm-71900fbac76541d9a59fc7ef62a8665bfac2f731.zip | |
Get the code decl from the initial location context.
llvm-svn: 79591
Diffstat (limited to 'clang/lib/Analysis/GRExprEngine.cpp')
| -rw-r--r-- | clang/lib/Analysis/GRExprEngine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp index 487b9764ce2..3f59ba65249 100644 --- a/clang/lib/Analysis/GRExprEngine.cpp +++ b/clang/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); |

