[cfe-commits] r79591 - /cfe/trunk/lib/Analysis/GRExprEngine.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Thu Aug 20 20:05:37 PDT 2009
Author: zhongxingxu
Date: Thu Aug 20 22:05:36 2009
New Revision: 79591
URL: http://llvm.org/viewvc/llvm-project?rev=79591&view=rev
Log:
Get the code decl from the initial location context.
Modified:
cfe/trunk/lib/Analysis/GRExprEngine.cpp
Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=79591&r1=79590&r2=79591&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Thu Aug 20 22:05:36 2009
@@ -209,7 +209,7 @@
// 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);
More information about the cfe-commits
mailing list