For inter-procedural analysis, predecessor node may be in another function.
So we should use the current program point.
llvm-svn: 91989
diff --git a/clang/lib/Analysis/GRCoreEngine.cpp b/clang/lib/Analysis/GRCoreEngine.cpp
index 1c05ddc..209452a 100644
--- a/clang/lib/Analysis/GRCoreEngine.cpp
+++ b/clang/lib/Analysis/GRCoreEngine.cpp
@@ -213,9 +213,9 @@
CFGBlock* Blk = L.getDst();
// Check if we are entering the EXIT block.
- if (Blk == &(Pred->getLocationContext()->getCFG()->getExit())) {
+ if (Blk == &(L.getLocationContext()->getCFG()->getExit())) {
- assert (Pred->getLocationContext()->getCFG()->getExit().size() == 0
+ assert (L.getLocationContext()->getCFG()->getExit().size() == 0
&& "EXIT block cannot contain Stmts.");
// Process the final state transition.
@@ -447,7 +447,7 @@
ProgramPoint::Kind K,
const void *tag) {
- const ProgramPoint &L = GetProgramPoint(S, K, Pred->getLocationContext(),tag);
+ const ProgramPoint &L = GetProgramPoint(S, K, Pred->getLocationContext(),tag);
return generateNodeInternal(L, state, Pred);
}