Index: cfe/trunk/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp =================================================================== --- cfe/trunk/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp +++ cfe/trunk/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp @@ -398,17 +398,19 @@ ProgramStateRef RangeConstraintManager::removeDeadBindings(ProgramStateRef state, SymbolReaper& SymReaper) { - + bool Changed = false; ConstraintRangeTy CR = state->get(); - ConstraintRangeTy::Factory& CRFactory = state->get_context(); + ConstraintRangeTy::Factory &CRFactory = state->get_context(); for (ConstraintRangeTy::iterator I = CR.begin(), E = CR.end(); I != E; ++I) { SymbolRef sym = I.getKey(); - if (SymReaper.maybeDead(sym)) + if (SymReaper.maybeDead(sym)) { + Changed = true; CR = CRFactory.remove(CR, sym); + } } - return state->set(CR); + return Changed ? state->set(CR) : state; } RangeSet