aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/GRExprEngine.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-07-17 13:51:58 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-07-17 13:51:58 +0000
commitee30965ce96e0a7b04b1aa16df60e9ba8b0a33c9 (patch)
tree1e3565168daf72c00eb5d39e2c2897a2ada1cca5 /lib/Checker/GRExprEngine.cpp
parent5a9ac23182abfec4e04bf9d7d0c23ededf9a87c6 (diff)
Revert r108617, it broke the build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108621 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/GRExprEngine.cpp')
-rw-r--r--lib/Checker/GRExprEngine.cpp39
1 files changed, 13 insertions, 26 deletions
diff --git a/lib/Checker/GRExprEngine.cpp b/lib/Checker/GRExprEngine.cpp
index ce7b9d8d8e..26b5801068 100644
--- a/lib/Checker/GRExprEngine.cpp
+++ b/lib/Checker/GRExprEngine.cpp
@@ -1441,12 +1441,12 @@ void GRExprEngine::ProcessSwitch(GRSwitchNodeBuilder& builder) {
}
void GRExprEngine::ProcessCallEnter(GRCallEnterNodeBuilder &B) {
- const StackFrameContext *LocCtx
- = AMgr.getStackFrame(const_cast<AnalysisContext *>(B.getCalleeContext()),
- B.getLocationContext(),
- B.getCallExpr(),
- B.getBlock(),
- B.getIndex());
+ const FunctionDecl *FD = B.getCallee();
+ const StackFrameContext *LocCtx = AMgr.getStackFrame(FD,
+ B.getLocationContext(),
+ B.getCallExpr(),
+ B.getBlock(),
+ B.getIndex());
const GRState *state = B.getState();
state = getStoreManager().EnterStackFrame(state, LocCtx);
@@ -1886,29 +1886,16 @@ bool GRExprEngine::InlineCall(ExplodedNodeSet &Dst, const CallExpr *CE,
if (!FD)
return false;
- // Check if the function definition is in the same translation unit.
- if (FD->hasBody(FD)) {
- // Now we have the definition of the callee, create a CallEnter node.
- CallEnter Loc(CE, AMgr.getAnalysisContext(FD), Pred->getLocationContext());
-
- ExplodedNode *N = Builder->generateNode(Loc, state, Pred);
- Dst.Add(N);
- return true;
- }
+ if (!FD->hasBody(FD))
+ return false;
- // Check if we can find the function definition in other translation units.
- if (AMgr.hasIndexer()) {
- const AnalysisContext *C = AMgr.getAnalysisContextInAnotherTU(FD);
- if (C == 0)
- return false;
+ // Now we have the definition of the callee, create a CallEnter node.
+ CallEnter Loc(CE, FD, Pred->getLocationContext());
- CallEnter Loc(CE, C, Pred->getLocationContext());
- ExplodedNode *N = Builder->generateNode(Loc, state, Pred);
+ ExplodedNode *N = Builder->generateNode(Loc, state, Pred);
+ if (N)
Dst.Add(N);
- return true;
- }
-
- return false;
+ return true;
}
void GRExprEngine::VisitCall(CallExpr* CE, ExplodedNode* Pred,