summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/GRCoreEngine.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-07-17 11:12:42 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-07-17 11:12:42 +0000
commit4ca4a999b1b298fd72601599c255f2e5e550e5e1 (patch)
tree26799e9cd0b9d513a823a743a035adc80980cd85 /clang/lib/Checker/GRCoreEngine.cpp
parent0eda30d65fe315b6c1d0913c49d44544872b3cfc (diff)
downloadbcm5719-llvm-4ca4a999b1b298fd72601599c255f2e5e550e5e1.tar.gz
bcm5719-llvm-4ca4a999b1b298fd72601599c255f2e5e550e5e1.zip
Prepare the analyzer for the callee in another translation unit:
Let AnalysisContext contain a TranslationUnit. Let CallEnter refer to an AnalysisContext instead of a FunctionDecl. llvm-svn: 108617
Diffstat (limited to 'clang/lib/Checker/GRCoreEngine.cpp')
-rw-r--r--clang/lib/Checker/GRCoreEngine.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/lib/Checker/GRCoreEngine.cpp b/clang/lib/Checker/GRCoreEngine.cpp
index a816186a307..df790e304a4 100644
--- a/clang/lib/Checker/GRCoreEngine.cpp
+++ b/clang/lib/Checker/GRCoreEngine.cpp
@@ -227,8 +227,8 @@ bool GRCoreEngine::ExecuteWorkList(const LocationContext *L, unsigned Steps) {
void GRCoreEngine::HandleCallEnter(const CallEnter &L, const CFGBlock *Block,
unsigned Index, ExplodedNode *Pred) {
- GRCallEnterNodeBuilder Builder(*this, Pred, L.getCallExpr(), L.getCallee(),
- Block, Index);
+ GRCallEnterNodeBuilder Builder(*this, Pred, L.getCallExpr(),
+ L.getCalleeContext(), Block, Index);
ProcessCallEnter(Builder);
}
@@ -692,6 +692,12 @@ void GREndPathNodeBuilder::GenerateCallExitNode(const GRState *state) {
void GRCallEnterNodeBuilder::GenerateNode(const GRState *state,
const LocationContext *LocCtx) {
+ // Check if the callee is in the same translation unit.
+ if (CalleeCtx->getTranslationUnit() !=
+ Pred->getLocationContext()->getTranslationUnit()) {
+ assert(0 && "to be implemented");
+ }
+
// Get the callee entry block.
const CFGBlock *Entry = &(LocCtx->getCFG()->getEntry());
assert(Entry->empty());
OpenPOWER on IntegriCloud