Go not generate a new transition by addTransition methods if nothing changed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143091
91177308-0d34-0410-b5e6-
96231b3b80d8
/// \brief Generates a default transition (containing checker tag but no
/// checker state changes).
- // TODO: Can we remove this one? We always generate autotransitions.
ExplodedNode *addTransition() {
return addTransition(getState());
}
ExplodedNode *P = 0,
const ProgramPointTag *Tag = 0) {
assert(State);
+ if (State == Pred->getState() && !Tag && !MarkAsSink)
+ return Pred;
+
ExplodedNode *node = NB.generateNode(Tag ? Location.withTag(Tag) : Location,
State,
P ? P : Pred, MarkAsSink);